• downsdesign

    (@downsdesign)


    I’m having trouble figuring out why my sidebar stops working on the internal pages of a site I’m working on.

    See “RECENT PROJECTS” displaying query of custom post-type

    Works Here: titles
    http://emergingterrain.org/blog/

    Not Working Here:
    http://emergingterrain.org/blog/page/2

    Here is my sidebar-projects.php code:

    <?php wp_reset_query(); ?>
    <?php
    $args = array(
    "post_type" => "projects",
    "category" => "5"
    );
    query_posts($args);
    ?>
    <!-- moved query to here to get Recent Projects to display  -->
    
    <div class="block" id="projects">
    <h3>Recent Projects</h3>
    <ul>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
    <?php endwhile; endif; ?>
    </ul>
    </div><!--.block-->

    Here is my sidebar.php code

    <?php if (in_category('blog') ) {
    get_sidebar('description');
    get_sidebar('recentPosts');
    get_sidebar('projects');
    get_sidebar('past-posts');
    get_sidebar('categories');
    } ?>
  • The topic ‘Sidebar query stops working on internal pages’ is closed to new replies.