WordPress.org

Ready to get started?Download WordPress

Forums

Creating Loop on WordPress Page (4 posts)

  1. brmorrison61
    Member
    Posted 2 years ago #

    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!!

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    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.

  3. brmorrison61
    Member
    Posted 2 years ago #

    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

  4. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic