TUTORIAL

Hide away slider posts

Welcome to another tutorial on my website. This time it’s about the slider images and how to remove its posts from everywhere including the front page.

If you are new to the theme or to the slider I suggest that you rather first have a look this tutorial:

Make the slider work

which explains the basic use of the slider and its images.

Introduction

Many people don’t want the slider images to appear on their front page or anywhere else. It would be an easy task to hide them from the blog pages by putting them into the portfolio of the theme. But that will still display them everywhere else like categories, tags, search results, date archive and some more places.

In this tutorial I will guide you how to:

  • Compose posts for each slider image
  • Create a new category for slider posts
  • Attach the image to the post
  • Mark the post as invisible
  • Select the post as sticky
  • Assign posts to the slider category
  • Select the slider category as portfolio category
  • Exclude slider posts from the home page
  • Choose appropriate publishing dates

Here is the step by step guide:

1) Install and activate the plugin „WP Hide Post“

This plugin hides the post from everywhere except the home page.

If you activate the option to remove the post from the front page (= first blog page) it won’t be able to feed the slider. Therefore you will learn how to remove the post from the blog pages in another way so they can’t be found, even not by scrolling through older posts. For now just install the plugin.

2) Create a new category for the slider posts

At this point to have to make a decision as I’m using the portfolio option of the theme for this technique:

A) Don’t use my portfolio: If you’re using and needing the portfolio already for any other purpose than in this case simply skip to point 9) “Choose an appropriate post publishing date“ in this tutorial. You can still hide the slider posts throughout your site except for the blog pages. Which means they can be found at least by scrolling through the pages of your posts.

B) You can have it: Sacrificing your portfolio gives you the opportunity to hide the posts from EVERYWHERE including front page and following blog pages. Every post for the slider will not be visible at the front page and the following blog pages. Therefore create a new category (e.g. „slider posts“) at “Posts/Categories”.

3) Attach a slider image to the post

Start creating  a post for the slider. While creating add a featured image to the post in the dedicated “Featured Image” box. If there is no such box, click on “Options” on top of the window and activate “featured image”.

You can read more about how to create the best size for the slider image here:
Adjust slider images and links

4) Mark the post as invisible

With the plugin comes a new box: “Post Visibility”. Tick every option in this box EXCEPT the „Hide on the front page”. This one option leave unchecked. What would happen if you check it? Well, the slider won’t be able to see the posts anymore and the slider simply wouldn’t have any images. To hide the posts from the front page and the following blog pages you will use the portfolio as described before.

5) Select the post as sticky

To make the image appear in the slider you have to set the post to sticky. This is how the theme associates images that should appear in the slider.

While creating the post click on „Edit“ at „Visibility: Public“ in the dedicated „Publish“ box. Choose „Public“ and tick „Keep post on front page“. You can also do this in the post overview page when selecting „QuickEdit“. You will also find a checkbox for a „Keep post on front page“ option which you can tick. Don’t forget to save your changes.

6) Assign posts to the slider category

Because we will use the portfolio all the slider posts must be marked for this category. So while creating your new post choose the new category you added before for your posts (e.g. „slider posts“) in the box “Categories”.

Now PUBLISH your posts.

7) Select the slider category as portfolio category

Now it’s time to tell the theme which category is the one to use as the portfolio.

Go to „Appearance/Theme Options“ and scroll down to the section „Portfolio Page“. In the dropdown select the category for your slider post (e.g. „slider posts“).

8) Exclude portfolio posts from the home page

Now we’re using a portfolio the posts will be visible on both: On the front page and following blog pages as well as in the portfolio. We therefore have to tell the theme to exclude these posts from the main loop of the home page.

  • Go to „Appearance/Theme Options“ and scroll down to the section „Home Page“.
  • Activate the checkbox at „Sticky Posts Slider“
  • Activate the checkbox at „Exclude Portfolio“
  • Save your changes at the bottom of the page

9) Choose an appropriate post publishing date

In case you are using an archive widget somewhere in your blog you have to be careful about the publishing date. Why? Because we selected to hide the slider posts from the archive it still create a link in case there are now other publications in the period specified (week/month/year). Sounds complicated but it’s easy. Example: Let’s say you’ve chosen to show your archive on a monthly period. Than choose a publishing date for the slider post were you already published other posts. If there is no other post published in this month but only the slider post, you will see a new entry for this month in the archive and a „404 error“ when selecting this entry.

Why all this when I’m hiding the post anyway? Yes, but only if you use the portfolio to hide your slider posts. For all who use their portfolio for other purposes this is a way to hide the slider posts somewhere deep down and early in the archive.

AND THAT’S IT !!

I hope you like the tutorial and it was helpful for you.

Cheers,
Alexander

 

P.S.
I’m no longer with the Pinboard theme.
The tutorials are still accessible but no longer supported.

/closed