• I would like to be able to use a Category as a sub-page for a Page on my site. Here’s a link to an example of what I’m currently doing:

    http://musictech.uncg.edu/trombone/performances/

    I’m using a page template to call all of the posts for “Performances”. This is sorta of working, but it breaks the formatting of the right side bar. Here is my template code:

    <?php
    /*
    Template Name: performances.php
    */
    ?>

    <?php
    get_header();
    ?>

    <div id=”main”>
    <div id=”main_inner” class=”fluid”>

    <?php include (TEMPLATEPATH . ‘/leftsidebar.php’); ?>

    <div id=”primaryContent_3columns”>
    <div id=”columnA_3columns”>

    <br class=”clear”>

    <div class=”post”>

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    <div class=”post”>
    <?php
    $myposts = get_posts(‘category=19’);
    foreach($myposts as $post) :
    ?>
    <h2 id=”post-<?php the_ID(); ?>”>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?></h2>
    Posted by <?php the_author() ?> on <?php the_time(‘M d Y’);?><?php the_content(); ?>
    </div>
    <?php endforeach; ?>

    <!– Stop The Loop (but note the “else:” – see next line). –>
    <?php endwhile; else: ?>

    <!– The very first “if” tested to see if there were any Posts to –>
    <!– display. This “else” part tells what do if there weren’t any. –>
    Sorry, no posts matched your criteria.

    <!– REALLY stop The Loop. –>
    <?php endif; ?>

    </div>
    </div>
    </div>

    <?php include (TEMPLATEPATH . ‘/rightsidebar.php’); ?>

    <?php get_footer(); ?>

    I found parts of it here and combled it together with the page template of my current theme. It works sorta of and I wondered if either someone can tell me what’s missing to mess up the rightbar format, or if there is an easier way of making a Category appear as a subpage? Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter brthacker

    (@brthacker)

    I’ve created custom templates for my categories, but what I really want to do is create a Page for certain posts, or at least use a Category as a Page/Subpage. I haven’t figure out how to do that, as I have static pages for sections, such as “trombone” that I would like to have a subpage which is constantly updated with content via posts.

    As there anyway to do that? Thanks!

    Brian

    Thread Starter brthacker

    (@brthacker)

    So if I move the last two </div> tags to the end, it fixes the formating of the right side bar. But I was curious if there is a plugin or some other way to use a Category as a Page (in WP parlance).

    Brian

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Use category as a subpage of Pages’ is closed to new replies.