• I’m using the following to list the pages and their children, but I need the image out of the loop (but I still need to display it), so I can style the actual page titles in an <ul> and it won’t affect the image. I attached an image to give you an idea of what I want. If there is a better way to do this besides get_pages? Thanks!!

    Each Video is its own page as well.
    http://i.stack.imgur.com/FmH6L.jpg

    <?php
        $args = array(
        'child_of'     => 200,
        'title_li'     => '',
        'depth'			=> 0,
        'sort_order'	=> 'DESC',
        'sort_column'	=> 'post_date'
        );
    
        $pages = get_pages( $args );
    
        $output = "";
    
        foreach($pages as $value){
    	    $thumb = get_the_post_thumbnail( $value->ID, full, $attr = '' );
    	    $output .= $thumb;
    	    $output .= "<li>";
    	    $output .= "<a href='" . $value->post_name . "'>" .  $value->post_title . "</a>";
    	    $output .= "</li>";
        } 
    
        echo $output;
        ?>

  • The topic ‘Help with creating Video archive with get_pages’ is closed to new replies.