• Resolved betwixt

    (@betwixt)


    Hi there. I’ve read for days now, but I can’t seem to accomplish what I’m trying to do.

    With the ACE plugin (Advanced category excluder), I excluded category with ID 7 from the default home page “Blog”.
    I would like to have a second page (or link in the header next to blog) that displays the posts from the category with ID 7, in the exact same layout of the home blog page.

    Now when I use the template I created below, it displays “Archive for the xx category” at the top and misses a rollingarchive function that K2 has at the main home page.

    <?php /*
        Template Name: xx
    */ ?>
    <?php get_header(); ?> 
    
    <div class="content"> 
    
        <div id="primary"> 
    
    <?php
        $events_cat = '7'; 
    
        if (!is_paged()) {
            query_posts('cat=' . $events_cat);
        } else {
            query_posts('cat=' . $events_cat . '&paged=' . $paged);
        }
    ?>
            <?php include (TEMPLATEPATH . '/theloop.php'); ?> 
    
        </div> 
    
        <?php get_sidebar(); ?> 
    
    </div> 
    
    <?php get_footer(); ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘category templates’ is closed to new replies.