Blog Page With Single Category in WordPress

    By Prasanna Bidkar | Small Business

    Creating a blog page with single category can help you shorten your category page URL by bringing it up one level, give you a separate landing page for a category, and allow custom look-and-feel for the specific blog page.

    Using the existing theme feature

    I didn’t even know that I could do this in minutes with Elegant Themes. The themes have an option to select a blog template and specify a category for that page. So before you read on, check if your theme has these two things: a blog template and template options.

    Step 1: Select a Page Template

    Create a new page and in the Page Attributes box, click the Template list, and then click Blog Page.

    Blog Page With Single Category in WordPress image catblog1Blog Page With Single Category in WordPress

    Now, check if you have a Template Settings option. Make sure that all options are selected in the Screen Options. If you have these, you probably have a list of categories to select.

    Blog Page With Single Category in WordPress image catblog2Blog Page With Single Category in WordPress

    Step 2: Choose the post category

    Select the post category you want to display, and then click Publish to create blog page with a single category.

    Adding a new template

    This method will need a bit of work with your theme code. If you are still reading, I will walk you through the process one step at a time. In this method, we create a template file and modify the existing code to suit our purpose.

    Step 1: Locate the default template file.

    Log on to your WordPress Dashboard, point to Appearance, and then click Editor. On the right side, under Templates, locate Page.php. You will find this file in most of the themes that come with WordPress. Alternatively, you can select the Front Page Template if your default page is a blog.

    Step 2: Create a copy of the template file.

    Click Page.php. You will now see the file contents in the main area. Copy the entire code and paste it in a text editing tool.

    Warning: Do not edit or change the existing file in WordPress!

    Step 3: Add code to display posts from a category you want.

    a. In the text file, navigate to the following line:

    b. Add the following code between

    More Social articles from Business 2 Community:

    Subscribe to our mailing list
    * indicates required
    Small Business Services