Support » Fixing WordPress » Creating Loop on WordPress Page

  • So I’m trying to get my page I created in wordpress named “blog” to populate with blog posts. I’ve taken the twenty-ten loop and inserted it into this page

    <div id="container">
    			<div id="content" role="main">
    
    <?php get_template_part( 'loop', 'page' );?>
    <?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
    			</div><!-- #content -->
    		</div><!-- #container -->

    but I get no posts. all my references are the same…this website is me altering the twenty-ten template.

    My Broken Page

    I’m sure I’m going about this backwards but I’m kind of stuck with this approach cause I’m too deep to turn back. Can you help me Please??!! Dying over hyere.

    Thank you in advanced!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • esmi

    (@esmi)

    Forum Moderator

    I’ve taken the twenty-ten loop and inserted it into this page

    Eek! Why on earth did you do that?

    1. You cannot add PHP code to your Page content
    2. All you need to do is create an empty page called Blog and a new (populated) page called Home and then see Creating_a_Static_Front_Page.

    im always shooting in the dark with PHP… thanks for the quick response! that was insanely easy. i feel “little”

    thank u thank u thank u

    esmi

    (@esmi)

    Forum Moderator

    i feel “little”

    Don’t. Everyone has to start learning at some point. Just bear in mind that, if something seems terribly complex, it might be that you’re missing the obvious answer. So just post here and ask. Happy WordPressing. :-0

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Creating Loop on WordPress Page’ is closed to new replies.