If you’re just getting started with WordPress, you’ll notice that every blog post you write gets displayed on the front page of your website. Traditionally, this is how blogs have worked with a chronological display of the author’s posts. But sometimes you want the post to appear in a different page instead. Typically this happens when you want to maintain several “categories” of posts and you don’t want your visitors to get confused between the various sections. In this tutorial, I’ll take you through a step-by-step explanation of how to achieve this.
Deciding on the Front Page
If you don’t want all of your posts to appear on the front page, you have to ask yourself what your homepage should look like. Do you want it to display a static page that never changes? Or do you want it to contain everything except certain posts belonging to a specific category? The answer to this will determine what steps you need to take.
For example, say you want your front page to always show the same content –an “About Me” landing page for example. To achieve this, you need to follow my earlier tutorial on how to create a static landing page for WordPress.
Once you’ve created your static landing page, visiting the home URL of your WordPress blog will show you content that never changes like this example page on my website:
When you create a post in WordPress, you can assign it to several “categories” that are defined by you. If you scroll down a bit in this tutorial, you see a screenshot of how to do this. If you want your front page to display everything except posts belonging to a certain category, install a plug-in like Ultimate Category Excluder which will get the job done for you.
Defining Categories and Creating the Menu
Start by creating a new post in WordPress. Give it a title and write the content. Now it’s time to “categorize” the post. On the right-hand side of the WordPress editor, scroll until you locate a panel called “Categories”. If you don’t already have some categories defined, you can add new ones by clicking the “Add New Category” link as shown here:
The next time you write a new post, you won’t have to define the same category all over again – it’ll be ready for you and you can simply place a checkmark next to it. Using this technique, you can have multiple posts belonging to a separate category – in fact, you can assign a single post to several categories if you want!
Once you’ve created your categories and have placed a checkbox next to the one in which you want your post to be slotted, save your work. The next thing to do is to create a menu item that allows users to view all the posts in a given category.
To do this, go to “Appearance->Menus” on the left-hand side of the WordPress dashboard as shown here:
This will bring up the menu editing screen. You can choose items from the left-hand side and add them to the menu on the right. In our case, scroll down to the “Categories” tab and expand it. Over here, place a checkmark next to the new category you just created and click “Add to Menu”.
This will add the desired category to the existing WordPress menu. Note that you can drag-and-drop it to its desired location so you can control the order in which it appears:
Save your menu and visit your blog once again. This time, you should see your category appear in the main navigation menu on all your pages. Clicking this will bring up a list of all posts slotted under that particular category as shown here:
Using this technique, you can have different posts show up in different pages in WordPress instead of having all of them in one big bunch on the front page. This allows you to segregate your blog by topics so that each visitor only sees what is of interest to them.