• Hello,

    Where can I learn about how do I get my posts to show up on two different pages that I’ve created on my website, and not on my home page? I still want to put posts on my home page, but some others are essays that i want to place on different pages that I’ve created.

    This has been an incredibly frustrating problem to solve.

    Thank you ahead of time.

    Best,

    Drew

Viewing 1 replies (of 1 total)
  • Had the same issue. There seem to be a few ways to do this. The rockstar guide has a different approach than my solution:

    1. Duplicate your page.php and call it something like essay.php or whatever appropriate.

    2.Edit the essay.php to have this in beginning before anything else:

    <?php
    /*
    Template Name: Essay
    */
    ?>

    And change your loop to have the query_posts show only posts from a specific category (only first line should be added):

    <?php query_posts('category_name=essay'); ?>
    <?php if(have_posts()) : while(have_posts()) : the_post(); ?>
    <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <?php the_content(); ?>

    Create a category called essay.
    All the post to appear on essay page, should be within this category.

    Then under pages, change your Essay page to use the Essay template (quick edit).

    Then do the same with other pages.

    Morten

Viewing 1 replies (of 1 total)
  • The topic ‘Creating Posts on Different Pages’ is closed to new replies.