WordPress.org

Ready to get started?Download WordPress

Forums

How to remove posts from home page? (6 posts)

  1. Mahesh Mohan
    Member
    Posted 2 years ago #

    Is it possible to remove posts from homepage only? Or say block posts in few categories or tags from appearing on home page. Is that possible without using any plugin? If not then which is the best plugin?

  2. patv
    Member
    Posted 2 years ago #

    using WP_Query(), specifying the argument cat you can specify what category id's you want to include in your query and/or (using its negative equivalent value) the id's to exlude from the query.

    using get_posts(), the idea is the same but the argument key is category.

  3. Mahesh Mohan
    Member
    Posted 2 years ago #

    Any reference URL(s)?

  4. patv
    Member
    Posted 2 years ago #

    What do you mean?

  5. Mahesh Mohan
    Member
    Posted 2 years ago #

    I want to hide few posts say from a particular category from the homepage... that is I dont want them to show in latest posts....

  6. patv
    Member
    Posted 2 years ago #

    Yes... you will need to specify arguments in your WordPress query. All depending on the theme and setup you have, this would be found in front-page.php or home.php, or in a custom template file that points to the page set as your front page in your WordPress setup.

    See the above links on how to modify the arguments to your query.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.