Support » Fixing WordPress » Add surrounding divs to thumbnail

  • HHannes

    (@hhannes)


    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

  • The topic ‘Add surrounding divs to thumbnail’ is closed to new replies.