• Resolved jesse147

    (@jesse147)


    I have 3 single.php files so when a certain post is clicked in the categories page if goes to the first single.php which is `<?php $post = $wp_query->post;
    if ( in_category(‘category1’) ) {
    include(TEMPLATEPATH . ‘/single1.php’);
    } if ( in_category(‘category2’) ) {
    include(TEMPLATEPATH . ‘/single2.php’);
    }
    ?>` then it is directed to the appropriate single file. Now I have been trying to make links in these single.php files to link to all the other post in the same category. How can I do this?

Viewing 1 replies (of 1 total)
  • Thread Starter jesse147

    (@jesse147)

    <?php query_posts('category_name=Uncategorized'); ?>
    <?php while (have_posts()) : the_post(); ?>
            <li><a href="<?php the_permalink(); ?>">
              <?php the_title(); ?>
              </a>  </li>
            <?php endwhile; ?>
Viewing 1 replies (of 1 total)

The topic ‘Post Title’ is closed to new replies.