WordPress.org

Ready to get started?Download WordPress

Forums

DantoTube
Add surrounding divs to thumbnail (1 post)

  1. HHannes
    Member
    Posted 5 months ago #

    Hey!
    I am trying to make a home page where I display all the featured images of all pages. I have done that like this ` <?php $args = array(
    'post_type' => 'page',
    'post_status' => 'publish'
    );
    $pages = get_pages($args);
    foreach($pages as $page) {
    echo get_the_post_thumbnail( $page->ID, 'thumbnail' );
    }
    ?> `
    Would it be possible to separate the thumbnails using surrounding divs for each thumbnail so that they are displayed in separate divs/ blocks.

    Hope you understand what I am looking for!
    Hannes

    https://wordpress.org/plugins/wordpress/

Reply

You must log in to post.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 5 months ago by HHannes
  • This topic is not a support question
  • WordPress version: 3.8.1