Forums

Multiple Categories in Sidebar (4 posts)

  1. Schipani
    Member
    Posted 1 month ago #

    I'm trying to figure out how to have multiple categories in the sidebar area on some of my sub pages. If you look at the link I've attached, there is a main section and a sidebar section. The main section has multiple blue categories (articles, arts, poetry...) but the side bar only has the one blue category (departments). I would like to add another category in the sidebar section titles Books, and have the book reviews and book essays under that. I tried making another parent category entitles "Books" and making Book essay and Book reviews a sub category, but then nothing changed. What am I doing wrong?

    Thanks!

    http://www.theamericanscholar.org/autumn-2009/

  2. songdogtech
    Member
    Posted 1 month ago #

    You can add another wp_list_categories call to your sidebar. Might not be easy, depending on the theme; it looks like a paid theme. What's in your sidebar.php?

  3. Schipani
    Member
    Posted 1 month ago #

    <?php
    $current_issue = get_option('scholar_current_issue');
    $current_issue_id = get_cat_id($current_issue);
    ?>

    <div id="left">
    <div class="content">

    <div class="searchbox">
    <form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
    <input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
    <input type="submit" id="searchsubmit" value="Search" />
    </form>
    </div>

    <p class="current-issue-cover nomargintop">
    <?php
    $cover='/wp-content/uploads/'.get_category($current_issue_id)->category_nicename.'.jpg';
    echo ''.'<img src="'.$cover.'">';
    ?>
    Current Issue</p>

    <!-- BEGIN: Constant Contact Stylish Email Newsletter Form -->
    <div align="center">
    <div style="width:160px; background-color: #ffffff;">
    <form name="ccoptin" action="http://visitor.constantcontact.com/d.jsp" target="_blank" method="post" style="margin-bottom:3;">
    <font style="font-weight: bold; font-family:Tahoma; font-size:12px; color:#0066FF;">To sign up for our monthly E-newsletter, enter your E-mail address</font>
    <input type="text" name="ea" size="20" value="" style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; font-size:10px; border:1px solid #999999;">
    <input type="submit" name="go" value="GO" class="submit" style="font-family:Verdana,Arial,Helvetica,sans-serif; font-size:10px;">
    <input type="hidden" name="m" value="1102441289852">
    <input type="hidden" name="p" value="oi">
    </form>
    </div>
    </div>
    <!-- END: Constant Contact Stylish Email Newsletter Form -->

    <h3>Just Posted</h3>
    <?php $my_query = new WP_Query(array('category__and'=>array(189),'showposts'=>100,'orderby'=>title,'order'=>ASC)); ?>
    <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
    <p class="halfmargintop">"><?php echo get_post_meta($post->ID, 'link text', true); ?></p>
    <?php endwhile;?>

    <h3>Point of Departure</h3>
    <?php $my_query = new WP_Query(array('category__and'=>array($current_issue_id,190),'showposts'=>100,'orderby'=>title,'order'=>ASC)); ?>
    <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
    <p class="halfmargintop">"><?php echo get_post_meta($post->ID, 'link text', true); ?></p>
    <?php endwhile;?>

    <h3>Web Exclusives</h3>
    <?php $my_query = new WP_Query('cat=225&showposts=1&order=DESC'); ?>
    <ul class="menulist">
    <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>

  4. "><?php echo get_post_meta($post->ID, 'link text', true); ?>
  5. <?php endwhile;?>

  6. Archives
  7. <h3>From Past Issues</h3>
    <?php $my_query = new WP_Query('cat=191&showposts=100&order=DESC'); ?>
    <ul class="menulist">
    <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>

  8. "><?php echo get_post_meta($post->ID, 'link text', true); ?>
  9. <?php endwhile;?>

    <h3>Tell Us What You Think</h3>
    <p class="halfmargintop">E-mail us at scholar@pbk.org.</p>

    <script type="text/javascript"><!--
    google_ad_client = "pub-8073830350846807";
    /* Vertical skyscraper, left column */
    google_ad_slot = "6465921261";
    google_ad_width = 120;
    google_ad_height = 600;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>

    </div>
    </div>

  • songdogtech
    Member
    Posted 1 month ago #

    Rather than that, it looks like it's in the page template you're using for "Current Issue" and an associated sidebar. Post the code for that template if you know which one it is, or list the files in your whole theme.

  • Reply

    You must log in to post.

    About this Topic

    Tags