faster is better than slow | Download Swift
+ Reply to Thread
Results 1 to 5 of 5

Thread: Displaying Post with a certain category on the home page

  1. #1


    I have a number of posts marked under certain categories - I would like to only display those posts with a certain category(s) on the home page ..... how do I do this. At the moment SWIFT displays all - which isn't quite what I need.


  2. #2


    add this line

    <?php query_posts($query_string . '&cat=5,6,7'); ?>


    if (have_posts()) : while (have_posts()) : the_post();

    In layouts/blog.php and layouts/magzine.php

    Replace 5,6,7 with the id's of categories you want to display.

  3. #3


    there's also a really good plugin called Simply Exclude if you don't want to mess about with code, or want it to be a temporary thing.

    I use it, highly recommended and works perfectly with Swift

  4. #4
    Join Date
    Dec 2009


    I can't get any of my posts to appear in the Home Page magzine section. It's completely blank.

    How do I assign what categories get listed there...I would actually prefer just to have the most recent ones (perhaps 10) listed.

    What I'm referring to:



  5. #5

    How about if I want to display posts of a certain category only on 1 page, but not the homepage? Is there a PHP snippet I can put in the body of a page maybe?

+ Reply to Thread

Similar Threads

  1. Home page, after post content
    By isaac2k2 in forum Support
    Replies: 2
    Last Post: 05-08-2014, 11:36 PM
  2. adsense ad on home page between post...
    By catch222 in forum Support
    Replies: 2
    Last Post: 03-06-2014, 02:24 PM
  3. Replies: 4
    Last Post: 12-08-2011, 06:34 PM
  4. Replies: 1
    Last Post: 09-19-2011, 02:57 AM
  5. Category and post title front page
    By Ron in forum Support
    Replies: 3
    Last Post: 01-15-2010, 08:21 PM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts