Unfortunately due to other commitments, we are no longer able to provide support for these themes.

All our themes are now free and can be downloaded by anyone to use/modify however they wish.

We want to thank all our users for their support over the years. All the best in 2020 and beyond.

Home page "Our Latest Posts"- how to only display posts from one category

mary_bakermary_baker Lifetime Member
I am going to use the Derby Theme for a site but would like to have the home page "Our Latest Posts" pull posts from a specific category rather than all the categories. How can I do this?

Thanks,
Mary

Comments

  • Options
    Mark_HodderMark_Hodder Administrator, Lifetime Member
    Hi Mary,

    You can edit home.php included with this theme and look for:

    query_posts( array ('posts_per_page' => 3, 'post_type' => 'post' ) );

    and add in the category limiter, i.e

    query_posts( array ('posts_per_page' => 3, 'post_type' => 'post', 'cat' => 5 ) );

    5 in that example is the category ID you want it to pull from, so that would need to be changed to your own category ID for the category you are looking to use.
    Need Additional Help?
    - Check out the Resource Center for helpful tutorials and hints.


    image
  • Options
    mary_bakermary_baker Lifetime Member
    Hi Mark,

    I just wanted to thank you for your speedy reply. I haven't used too many Themedy themes but your incredible turnaround on support makes me have great confidence in using more. Thank you!
  • Options
    Mark_HodderMark_Hodder Administrator, Lifetime Member
    Your welcome Mary, I hope you find many uses for our themes over the coming months :D
    Need Additional Help?
    - Check out the Resource Center for helpful tutorials and hints.


    image
This discussion has been closed.