Support » Fixing WordPress » How to have a loop on a page on twentytvelwe?

  • Resolved ketri

    (@ketri)


    Hello,

    I would like to have the regular wordpress loop on twenty twelve theme, after the page content.

    If I make a custom loop, the styling needs to be done again.

    But if I just copy-paste the normal loop, it of course doesn’t loop trough posts but posts the content of the current page.

    So what is the easiest way to have a page that has
    – custom content on top
    – “blog” below (a view just like the blog view on twenty tvelwe)

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thank you!

    I used this template for page of posts in twenty twelve -theme. The posts work but the content of the page doesn’t show. Should I customize the page of posts somehow to have the content of the page also appear?

    Ok. I added

    if ( have_posts() ) :
                while ( have_posts() ) : the_post();
    
                  // Display content of page
                  get_template_part( 'content', get_post_format() );
                  wp_reset_postdata();
    
                endwhile;
            endif;

    from page of posts to the top of my page of posts-template and it works.
    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to have a loop on a page on twentytvelwe?’ is closed to new replies.