How to set up pages on your new WordPress blog

by Heather Cowper on 22, September 2010

This post will give you tips on how to set up pages for your WordPress blog. I originally wrote it when I was setting up my Travel blog at Heatheronhertravels.com, using the WordPress Theme, Revolution Lifestyle, so may not apply in every instance. This article was originally published at Heather on her travels here.

Wordpress logo

Wordpress logo

I’m in the process of setting up my new Travel blog using Revolution Lifestyle as a theme. There’s loads of help on WordPress forums to help you but if you’re a beginner with WordPress like me, you might find it useful to know how I set up my pages at the start.

Setting up Pages
Adding new pages is easy in your WP admin area by going to Write/Page. In the advanced options at the bottom, you can then set the order you want the pages to appear under Page Order. You can also select a template to use from the dropdown under Page Template.

I wanted to have two blog-style pages, each of which would have different kinds of content. One would be my travel blog, with all my travel related articles. The other would be my blogging journey, with articles related to setting up and developing my blog. I reasoned that not all readers interested in travel would be interested in the technicalities of blogging, so I wanted to keep the articles separate.

Read on if you’re setting up a wordress blog and think this could be useful to you.

Setting up two different blog pages
This is how I set two separate blog pages, each with different content.
WARNING: This involves changing the HTML code in the Design/Theme Editor/Templates. Before you make these or any other code changes, you should always as a precaution make a copy of the original HTML code, for instance in a Word Document, in case you make a mess of it and need to easily go back to the original version.

Page 1 – my travel blog
1. I created a page called my travel blog in the WP Admin area, choosing the blog page template from the dropdown under Advanced Options/Page template.
2. I had already set up some categories and sub-categories in the WP admin area under Manage/Categories. When you are in the WP admin page Manage/Categories and looking at the list of your categories, you can hover over each category in the list and will see a link appear at the bottom of page which ends something like cat_ID=45. The number at the end of the link will be different for each category and is your category ID. You will need this ID when adjusting the code in your blog page templates, which will tell the page which category posts it needs to show.
3. I went to Design/Theme Editor and in the list of Templates on the right, selected the page_php template. This brings up all the code for that template in the window which can then be changed.
4. I looked for the following code
<!–p $page = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; query_posts(“cat=1&showposts=5&paged=$page”); while ( have_posts() ) : the_post()–>

In this code the cat=1 indicates the ID of the categories that will appear on this page. You can change it to another Category ID, for example by writing cat=3. If you want several categories to appear you can put a series of category IDs, for instance cat=1,2,3 . If you want all categories except one to appear, you can use the code cat=-1 where 1 represents the category ID you need to exclude. If you want all categories to appear you can remove the cat=1 altogether. The code will then look like this;
<!–p $page = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; query_posts(“showposts=5&paged=$page”); while ( have_posts() ) : the_post()–>

Incidentally, the showposts=5 indicates that 5 posts will show on the blogpage. You may can change this number if you want.
5. Save your changes. When you press the visit site button and view the updated site, the blog page should now show the posts from the categories you wanted.

Page 2 – my blogging journey
First I needed to set up a new template for the second blog page.
1. I went to the place on the computer where I had stored the unzipped files I downloaded for my wordpress theme, Revolution Lifestyle. I made a copy of the page_blog.php in the same folder giving it a new name, page_blog2.php.
2. I uploaded the page_blog2.php file onto my server. To do this I logged into my server. I opened the public_html/wp-content/themes/lifestyle10 folder on the server. Then I found the new file page_blog2.php that I had created and uploaded it to the lifestyle10 folder on the server. (The exact theme folder name may be different depending on the theme you are using).
4. The new file page_blog2.php should now appear in the WP admin area under Design/Theme Editor under the list of Templates. Now click on the new page_blog2.php template, which will bring all the code it contains into the viewer. You now need to make the necessary changes to the code to ensure your second page will show the categories you want.
5. At the top you’ll see the following code;

/*
Template Name: Blog Page
*/

You should change the words Blog Page to whatever name you want to give your new template. For instance, I changed it to;
/*
Template Name: My blogging journey
*/

This will ensure that the new blog template shows up in the dropdown in the WP Admin area under Advanced Options/Page template. Save your changes.
6. You now need to change the category ID as described for Page 1 step 4 above, to ensure that your second page only shows the category you want to show on that page. In my case I used cat=40, in which 40 was the Category ID for my category named my blogging journey. Save your changes.
7. Next I created a page called my blogging journey in the WP Admin area, choosing the my blogging journey template from the dropdown under Advanced Options/Page template.

Lastly I made a few test posts, to check that my two blog pages were working correctly.

I’m just a beginner in setting up my WordPress blog, but hoping that what I’ve learned the hard way may be some use to you. However, if you have queries on how to do things, the best place to search is the WordPress Help area or the support area for your theme. Happy Blogging!

This article was originally published at Heatheronhertravels – here’s the original article about Setting up Pages in my new WordPress blog.

Subscribe to My Blogging Journey Don’t miss out – subscribe to My Blogging Journey

Related Posts Plugin for WordPress, Blogger...
Save on hotels with HotelsCombined.com

{ 0 comments… add one now }

Leave a Comment

CommentLuv badge

Previous post:

Next post: