• Resolved sp33dyf33t

    (@sp33dyf33t)


    i would like to know how i could make a certain category appear on a certain page. so for “reviews” category i want to show in the “reviews” page in order from the most recent post to the oldest post

Viewing 4 replies - 1 through 4 (of 4 total)
  • Do you really need a page called Reviews?

    The natural archiving ability of WordPress will automatically show you the posts under the Category called Reviews (or any other Category name).

    Thread Starter sp33dyf33t

    (@sp33dyf33t)

    i want to make a page that is specifically for “hardware reviews” just as an archive page for that certain category

    If page title and category name are the same display the posts in that category–belongs in a Page Template:

    <?php
    if (is_page()) {
      $cat=get_cat_ID($post->post_title); //use page title to get a category ID
      $posts = get_posts ("cat=$cat&showposts=5");
      if ($posts) {
        foreach ($posts as $post):
          setup_postdata($post); ?>
          <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
        <?php endforeach;
      }
    }
    ?>

    Thread Starter sp33dyf33t

    (@sp33dyf33t)

    exactly what i needed thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Make a page for a certain category’ is closed to new replies.