• I want to create a category page template to display a post from a particular category on my homepage. More so, I want to make this category page my homepage. Please help me out, I know its possible.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hey wonuks

    If I get what you’re asking, once you create your page you could go to Settings | Reading and then choose ‘A static page’ and select the page.

    The thing with this is that you will have to create a page where your blogs will be shown if you want that.

    Thread Starter wonuks

    (@wonuks)

    Thanks @collin for the reply.

    I actually want to create a page that can show posts from a particular category. So I created a custom category page template and used that template in creating a page I want to use as the homepage. Visiting the page I created showed the posts from the category but when I made that page my homepage the post didn’t appear on the homepage anymore.

    Please I want you to help me. This the code I used for the category page template I created:

    `<?php
    /*
    Template Name: Home page
    */
    get_header();
    ?>
    <div class=”content”>
    <?php
    query_posts(‘cat=42’);
    while (have_posts()) : the_post();
    the_content();
    endwhile;
    ?>
    </div>
    <?php get_footer(); ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘I want to create a category page template for my homepage’ is closed to new replies.