• Hi,

    I’ve made a site that have a main navigation that shows categories as links. When I click one of the categories I’ll get a summary of all the posts that are under this category, and on the left side I’ll get a list of these same posts as links. The left side is OK but I dont want a summary of all the posts. I would like to have just one post with the same title as the category I’m currently in. And this posts should not be seen in the left list.

    I’ve tried to search the forum but because I’m quite new to WordPress, I’m no sure what would be the best keywords..=)

    In case somebody understood my problem and is willing to help. Here’s the code that shows the summary:

    <?php if (have_posts()) : while (have_posts()) : the_post(); query_posts(‘&tag=kynnys ‘);?>

    <div class=”post” id=”post-<?php the_ID(); ?>”>
    <h1><?php the_title(); ?></h1>
    <div class=”entry”>

    <?php the_content(‘<p class=”serif”>Read the rest of this page »</p>’); ?>

    <?php wp_link_pages(array(‘before’ => ‘<p>Pages: ‘, ‘after’ => ‘</p>’, ‘next_or_number’ => ‘number’)); ?>

    </div>
    </div>
    <?php endwhile; endif; ?>
    <?php edit_post_link(‘Edit this entry.’, ‘<p>’, ‘</p>’); ?>

Viewing 1 replies (of 1 total)
  • I would like to have just one post with the same title as the category I’m currently in

    And which post would that be?

Viewing 1 replies (of 1 total)

The topic ‘Show only one certain post from a category’ is closed to new replies.