Support » Fixing WordPress » Static homepage with links to blogs posts

  • Hi the title sort-off explains my issue, I want to have a static homepage (currently is showing all recent posts), that has thumbnails of recent posts, which redirects to the posts page.
    I believe I have to use a loop inside the home page, but I am unable to figure out how to do that, I am pretty new with wordpress and I am merely helping my mother to set up her page the way she wants it 🙂

    http://www.ausrasfoto.com

    If your press “Søk” all her blogposts appear the ways she wants them 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • right, you have to use loop to show all post

    <?php if( have_posts() ): ?>
    	<?php while( have_posts() ): the_post(); ?>
    <a>">
    <div>your div structure of image</div>
    </a>
    <?php endwhile;?>
    <?php endif; ?>

    Thread Starter Aislo

    (@aislo)

    Ok thanks, but the thing is i dont understand is how I add it?
    Do I just paste it in the “Text” field whilst editing the page?
    And what do I replace “your div structure of image” with?

    Sorry, my previous code was something wrong.

    If you have not created any template file for your home page then edit your index.php from activated theme folder and use it to display image with link

    <?php if( have_posts() ): ?>
    	<?php while( have_posts() ): the_post(); ?>
    <a>">
    <?php the_post_thumbnail();  //get image
    ?>
    </a>
    <?php endwhile;?>
    <?php endif; ?>

    yes, you can add from editor

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Static homepage with links to blogs posts’ is closed to new replies.