Particular Category post on homepage (Pinkster theme)

Discussion in 'WordPress' started by sunnytyagi, Jan 28, 2014.

  1. #1
    Hi,
    I am using Pinkster theme for my website and I want to show particular category post on homepage not all other category post on homepage can anyone guide on the same.

    <?php
    $temp = $wp_query;
    $wp_query= null;
    $wp_query = new WP_Query('showposts=&cat=&paged=' . $paged);
    ?>

    Thanks
    Dikshant
     
    sunnytyagi, Jan 28, 2014 IP
  2. themes4all

    themes4all Well-Known Member

    Messages:
    662
    Likes Received:
    47
    Best Answers:
    6
    Trophy Points:
    100
    #2
    You can use the Cat query like this :

    <?php query_posts($query_string . '&cat=10'); ?>

    Where 10 is the Category ID that you want to Display the Posts from on the Homepage.

    For more information about this query : http://codex.wordpress.org/Template_Tags/query_posts

    Goodluck
     
    themes4all, Jan 29, 2014 IP