Wordpress Post from a Category

by 4 replies
5
Hi All,

I'm having a bit of an issue trying to have a page just display the posts from one category. I'm using exec-php to allow the posting of php and the following code:

Code:
<?php query_posts('category_name=Reviews&showposts=100'); ?>
<?php while (have_posts()) : the_post(); ?>
<div><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a> </div>
<?php endwhile;?>
Unfortunately its returning the list and then all the other posts with the content, it can be seen at my website (I don't have enough posts yet for urls) freshbizoppsdotcom/reviews - remove the dot for a '.'

Apologies if this breaks a rule, if it does i'll change it but it helps show the issue

Any help is greatly appreciated!

Thanks
#programming #category #post #wordpress
  • Hi Ally,

    Not sure, but I think wordpress builds a page for the category all unto itself.

    Say your category is "birds," then if you provide a link to www.yoursite.com/birds/ then a page will appear listing all the posts in the category "birds."

    Would that do what you want?

    Kirk
    • [1] reply
    • Thanks Kirk, I had forgotten about that, the main issue I have is that I have the Reviews section in my menu which uses the wp pages function to show them. So if I used that I would have to add it manually (which may work). I could also use a php re-direct to that domain.com/page/

      I'll go and have a play with it and see what happens.

      Ally
      • [1] reply

Next Topics on Trending Feed