Show Wordpress Category on a Page

Discussion in 'WordPress' started by Blonde Jon, Jun 4, 2009.

  1. #1
    Does anyone know if it is possible to take one category and display it on a page in Wordpress. For example if I have a category named pickles, is there a way to display the posts in that category and that category only on the home page?
     
    Blonde Jon, Jun 4, 2009 IP
  2. qazu

    qazu Well-Known Member

    Messages:
    1,834
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    165
    #2
    Yes, but you'd need to edit the index.php file to include something like <?php if ( in_category( 'categoryName,' )) { ?> inside the loop at the start and <?php } ?> just before the end of the loop.

    Here a reference to the in_category function: http://codex.wordpress.org/Function_Reference/in_category
     
    qazu, Jun 5, 2009 IP
  3. SonnyCooL

    SonnyCooL Peon

    Messages:
    1,170
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i think much more easy ......
    create a page and redirect to the category then set the page as main page :)
    i think this should work ...
     
    SonnyCooL, Jun 5, 2009 IP