WP SITES

2952 Tutorials & 191 Plugins

Remove Posts From Displaying On Home Page

Many child themes now provide home page widgets to make it easy to display and customize your content.

Some also include posts below the widget areas which you may want to remove or hide from displaying.

To disable posts from displaying on these themes, there’s at least 3 ways to get the job done.

Use PHP Code To Remove Posts From Home Page

Simply add a line of code to your child themes home.php file.

You could also include this line in a custom function or add it with a conditional tag using the Footer and Header Scripts in your Genesis Theme Settings page.

remove_action( 'genesis_loop', 'genesis_do_loop' );

Not using the Genesis theme framework Change the hooks to your own theme specific hooks.

You can also use a custom function with the conditional tag for the home page in your child themes functions file like this:

This screenshot shows the remove action for the Genesis loop at the top of the file.

home page file

The code removes any blog posts from displaying on the home page.

Using CSS To Remove Home Page Blog Posts

You can also paste some CSS code into your child themes style.css file and this will also hide your latest blog posts from displaying on your home page:

.home .hentry {
    display: none;
}

Use Plugin To Remove Posts in Category From Homepage

If you only want to remove posts from one category displaying on the home page you can install a plugin to get the job done.

The plugin simply adds a check box to all your categories which you can enable on an individual basis.

This means you can prevent posts from multiple categories from displaying on your home page or blog page.

The plugin simply removes the posts in that category from being included in the main loop.

Remove Category Posts

This plugin also enables you to remove posts from specific categories from displaying in your RSS feed.

There’s more ways to remove posts from displaying on your home page i’m sure.

Do you know of any?

Related Tutorials

4 responses to “Remove Posts From Displaying On Home Page”

  1. Thanks for this. Here’s my issue, and perhaps you can help. I’m using the new Going Green Pro and home.php doesn’t seem to be there. I have functions and landing-page.php, but no home…what am I missing?

    1. Brad Dalton Avatar
      Brad Dalton

      Hello Allison

      Yes, you are right. There isn’t any home page template.

  2. No worries Maggie.

    Hope this helps you achieve what you want to do.

    I think i need to extend this tutorial into another because it really only focuses on removing posts from the home page and not the blog page.

    Stay tuned!

  3. Maggie Wall Avatar
    Maggie Wall

    Brad,

    Once again, you have JUST the answer I need when I need it. Thanks so much. I always open your emails to see what you are talking about (even though sometimes I don’t understand what you’re talking about! Ha!)

    This posts/homepage/blog is JUST what I need today. I believe it will work for something I’ve tried to figure out for months, and today was the day I committed myself to sitting down and doing it.

    I do a radio show about the Alaska Legislature (The LegHead Report) and use Fabric Child Theme for Genesis. I want to keep the newsy stuff separate from the funzy stuff.

    I want the “news/info/my original content” to go on the home page. I want the blog to be more “fun, other people’s, stuff off the web, related materials, etc.” and I do not want the blog to auto post to the home page.

    Also by keeping them separate I will be able to “tease” the blog on the home page with a short post with link telling people to check out the latest thing I just posted on the blog. My home page posts auto email to subscribers and auto post to Facebook and Twitter. This will allow me to use my main “vehicle” to promote the blog.

    Sorry if this is too long, but I love it when people explain what they are doing and why so that I get a better sense of how things might work for me.

    Maggie

Was This Tutorial Helpful?