Archived

This topic is now archived and is closed to further replies.

  • 0

Hiding blog posts from homepage


Question

Posted · Report post

Is it possible for posts from one particular category (Blog) not to show up on my homepage when I add a new post in this category? My homepage is not a static page, it is showing new posts (which are reviews in my case) and blog posts shouldn't be there.

I'm guessing WP isn't exactly designed to have homepage with posts and a blog page as separate feeds, but maybe there's a way around this? Thanks.
 

Share this post


Link to post
Share on other sites

15 answers to this question

Posted · Report post

Thanks a lot for the answer! I followed your instructions and now I have just one more question: how do I make my non-blog posts (posts from only one category in particular - Reviews) appear on homepage?

 

Sorry for being a little Pagelines-illiterate. :)

Share this post


Link to post
Share on other sites

Posted · Report post

I recommend the Special Recent Posts plugin.  This allows you to include a customized shortcode (example below) to any place on your page displaying posts from a specific category.

 

First let me point out that WP creates a numeric value for each category you create.  You'll find this when editing or creating the category via Dashboard > Posts > Categories.  You will need to edit the code provided below to suit your wishes. Instructions are on the Installation page for the Special Recent Posts (SRP) plugin:

 

[srp display_thumbnail='yes' post_content_type='excerpt' post_content_length='50' post_content_length_mode='words' category_include='45' category_title='no' string_break_link='yes' thumbnail_width='100' thumbnail_height='100' post_status='publish' post_limit='10' post_title_length_mode='fulltitle' widget_title_hide='yes']

You'll want to change the thumbnail size (default I believe is 50px x 50px in SRP;  the number of words for your excerpt; the category value (45 above) and the number of posts (10 above).  You can add the category title by changing no to yes, though I do not recommend it.

 

Every element of SRP has a unique CSS identifier (class or ID). This makes it easy to adjust anything.

Share this post


Link to post
Share on other sites

Posted · Report post

Thanks a lot for the answer. I still have some problems.

 

1) Special Recent Posts plugin is oly visible when I put it my Secondary Sidebar. I would like it to be visible in my Content Sidebar, but it doesn't work (Content section is active in the template I'm using).

 

2) No thumb is shown, even though the post contains a photo.

Share this post


Link to post
Share on other sites

Posted · Report post

1) Have you tried deactivating all other active plugins to see if it appears?

 

2) Are you setting the photo as a featured image (on the right side of the post editor)?

Share this post


Link to post
Share on other sites

Posted · Report post

1) Just tried it - didn't work. I'm using Template 2 for my homepage and when I go to Drag & Drop Template Setup, I choose Template 2, and the only thing active there is Content section (I think I don't need anything else there at this point). Then I go to Widgets and drag Special Recent Posts to the Content Sidebar on the right. Am I missing something? :)

 

2) Thank you, this worked!

 

I really appreciate your help, thanks!

Share this post


Link to post
Share on other sites

Posted · Report post

Have you tried it with Default Template instead of Template 2?

Share this post


Link to post
Share on other sites

Posted · Report post

Yeah... and still no luck. :(

Share this post


Link to post
Share on other sites

Posted · Report post

Hi there, checking on the link you've provided for admin in your profile it looks like the home page is using the default template.

 

When you say the 'content' sidebar, i'm assuming you mean the main content area? If so please check that the 'content' section is active in the 'page template area' in the drag and drop page, and that the 'postloop' is active inside the 'content-area'. Both of these are required to display anything that's inside of the main page content.

 

If you mean the primary sidebar, then please check which sidebar is active in sb1 inside the drag and drop page, and make sure the correct widget for special recent posts is in the correct sidebar location in appearance>widgets.

 

If still no joy, go in as if you're going to edit the page in Pages>click on your page and check the meta settings underneath the main entry content. Scroll down and you'll see a tab for 'page setup'. Make sure none of the sidebars or sections are checked to 'hidden'.

1 person likes this

Share this post


Link to post
Share on other sites

Posted · Report post

The code I gave you can be placed directly directly into a page, a post or a text widget and placed anywhere you'd like.

 

You do not have to use the SRP Widget.

1 person likes this

Share this post


Link to post
Share on other sites

Posted · Report post

Hello!

 

Thanks for the answer.

 

Yes, I've just changed it to Default as suggested by Catrina. I've been using term 'Content Sidebar' when reffering to 'Content Sidebar' in Widgets and 'Content section' when reffering to main content area, which can be found in Drag and Drop. My Content area is active, so is Post Loop.

 

Meta settings are fine.

 

Okay, that means my problem is somewhere in this part: "If you mean the primary sidebar, then please check which sidebar is active in sb1 inside the drag and drop page, and make sure the correct widget for special recent posts is in the correct sidebar location in appearance>widgets." :)

 

I don't see a primary sidebar, I only see universal sidebar and full width sidebar. Full width sidebar is the active one. Special recent posts widget is in the correct sidebar location in appearance>widgets, but it's still not exactly where I want it to appear on the site...

Share this post


Link to post
Share on other sites

Posted · Report post

Where exactly would you like the posts to appear on the page? We'll try and suggest a layout that could achieve that positioning

Share this post


Link to post
Share on other sites

Posted · Report post

It would appear you've added a sidebar to the Page Template above the Content section. You should apply the shortcode not in a widget in a sidebar there, but in the homepage in the edit field.  You can add things above or below it. At present, it just looks out of place where it is.

 

Go to Dashboard > Pages > All Pages and select the Home page. When it open, you'll see an editing area (large white space). Paste the shortcode you are using into that space and the posts will appear under the page title (Home) and above the Comments (Leave a Reply).  Because it's a shortcode, you can add images and/or text above it or below it. Because you're using a static page, you can also use a template to add sliders, carousels, etc.  The template will determine where the post loop (that edit field) is located on the page.

Share this post


Link to post
Share on other sites

Posted · Report post

I've tried putting the code into the page, also into the text widget in content sidebar. Nothing changes on the website. I've also tried playing with Drag & Drop and available sidebars a little - no desired result.

I want my special recent posts to appear where you can currently see "No posts available".

Many thanks,
Evelina

Share this post


Link to post
Share on other sites

Posted · Report post

Hi Evelina,

 

The message you have on your home page is from Special Recent Posts, therefore you have most likely not setup the widget correctly and therefore the shortcode has failed.

 

I recommend you review your settings, if you still encounter an issue, you will need to contact the Special Recent Posts author. We only suggested the plugin, we do not provide support for it.

Share this post


Link to post
Share on other sites

Posted · Report post

Actually, your analysis is incorrect.

 

You can (and should) create a static homepage, which will not (by default) show any posts, call it "home" (without quotes).  Also create a blank page called "blog" (without quotes) and use the template to apply sections to that page using Drag & Drop.

 

For example, you may select Template 1 for this page and using Drag & Drop, apply a slider, carousel and other sections to the page.  As long as you do not add anything, not even a punctuation in the edit field, then that saved blog page will display all your blog posts.

 

With these two pages saved, simply go to Dashboard > Settings > Reading.  Select "A static page..." and in the first drop list, select home. In the second, select blog from the drop list.

 

Once you do, your homepage will be the page called home (which may have anything on it that you'd like) and the blog page, which will show, in that blank space, the blog list.  It is not category specific. It's just the blog.

Share this post


Link to post
Share on other sites