New template for the ‘Atahualpa’ Theme: multi column/custom query

I’ve created a new page template for the WordPress theme ‘Atahualpa’. This PAGE template will allow you to use one template on any number of pages and have different options per page. It is a combination of a custom query and multi-column template (variable columns per page).

* you can code a custom query…or not
* you can choose to display the page TITLE…or not
* you can choose to display the page TEXT…or not
* you can define multiple columns…as many as you want, 1 to n (but any more that 5 or 6 makes them very narrow (with CSS you can define how wide each column should be)
* you can display x posts above the column

And the settings are unique to each page you use the template on.

============
INSTALLATION
============

This template currently works with only Atahualpa versions 3.6.7 and 3.7.1
1) download the attached file and unzip it.
2) upload it to your Atahualpa folder
3) edit a page in the backend and select the template ‘[COLOR=”Red”]JUGGLEDAD’s Multi Column/Custom Query[/COLOR]’

============
USAGE
============
If you wish to have multiple columns, add a custom field called ‘number_of_columns’ and put a number in the value field.

If you wish to have a post (or 3 or 10) above the columns, add a custom field called ‘posts_above_the_column’ and put a number in the value field.

If you wish to have show the page ‘title’, add a custom field called ‘show_page_title’ and put ‘yes’ or ‘no’ in the value field

If you wish to have show the page ‘text’, add a custom field called ‘show_page_text’ and put ‘yes’ or ‘no’ in the value field

If you wish to have custom query, add a custom field called ‘custom_query’ and put a custom query in the value field.

to craft a query, go to [url]http://codex.wordpress.org/Function_Reference/query_posts[/url]
to see the variations you can code. You use what is inside the quotes. For example, if you see
query_posts(‘cat=2,6,17,38′);
you would only enter
cat=2,6,17,38
into the custom field.

Here are some sample queries:
category_name=Direction
category_name=’Staff House’
tag=animal
post_status=published&posts_per_page=10
post_status=draft
post_type=’movie’ (yes you can use custom post types)
post_type=’page’ (you can have a page of ‘pages’)

====================
controlling the column widths
====================
You can easily control how wide the post columns will be by adding a couple selectors and rules to the ‘CSS Inserts’ option. By adding the ‘body.page-id-nnnn’ to the CSS Selector, you can customize the width per page. For example: Here is what might add for a three column page and a four column page

body.page-id-1493 .mccq_column1 {width: 33%;}
body.page-id-1493 .mccq_column2 {width: 33%;}
body.page-id-1493 .mccq_column3 {width: 33%;}

body.page-id-2367 .mccq_column1 {width: 20%;}
body.page-id-2367 .mccq_column2 {width: 20%;}
body.page-id-2367 .mccq_column3 {width: 10%;}
body.page-id-2367 .mccq_column4 {width: 50%;}

====================
LICENSE
====================
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Support for any problems encountered will be on an ‘as my time permits’ unless you want to hire me – in that case, send me a private message and I’ll tell you my rates.

====================
Download: you can get the template from the thread TEMPLATE: Multi Column/Custom Query page template in the http://forum.bytesforall.com
====================

Comments are closed.