WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to have a loop on a page on twentytvelwe? (4 posts)

  1. ketri
    Member
    Posted 10 months ago #

    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!

  2. Pioneer Valley Web Design
    Member
    Posted 10 months ago #

  3. ketri
    Member
    Posted 10 months ago #

    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?

  4. ketri
    Member
    Posted 10 months ago #

    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!

Reply

You must log in to post.

About this Topic