Return to Snippet

Revision: 13566
at April 28, 2009 03:55 by kristarella


Initial Code
function add_category_archives() {
    if (is_page('about')) {
    $limit = get_option('posts_per_page');
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts('category_name=Featured&showposts=' . $limit . '&paged=' . $paged);
    echo '<div id="content">';
    	thesis_home_loop();
    echo '</div>' . "\n" . '<div id="sidebars">';
    	thesis_build_sidebars();
    echo '</div>';
    }
}
remove_action('thesis_hook_custom_template','thesis_custom_template_sample');
add_action('thesis_hook_custom_template', 'add_category_archives');

Initial URL


Initial Description
This turns the about page into a featured category post page. The principles for just a regular custom page template with sidebars is there too.

Initial Title
Thesis custom page template with category posts

Initial Tags
template, wordpress

Initial Language
PHP