WordPress.org

Ready to get started?Download WordPress

Forums

Code Changes (1 post)

  1. katie1
    Member
    Posted 8 years ago #

    Hi All,
    Can someone please help me with this?

    If this code can pull all posts by author on a single.php page in the sidebar:
    <ul>
    <?php query_posts('cat=7&author=' . $post->post_author . '&order=ASC&showposts=-1'); ?>
    <?php if(have_posts()) : while(have_posts()) : the_post(); ?>
    <li>
    <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    </li>
    <?php endwhile; endif; ?>
    </ul>

    Can someone please advise what changes I'll need to make to this code so I can display ALL POSTS as Links in the sidebar on a single.php that relate to all posts in a given category regardless of which category/single.php is being displayed?

    Hmmm. I hope that makes sense.

    Ta muchly
    Kate

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.