• Resolved giographix

    (@giographix)


    hello

    i am trying to use get_pages to display only the grandchildren of 1 page. any help is greatly appreciated. thank you

    <?php
    	$args = array(
    		'post_type' => 'page',
    		'post_status' => 'publish',
    		'child_of' => 8
    		);
    	$attachments = get_posts($args);
    	if ($attachments) {
    		foreach ($attachments as $post) { ?>
    
    			<div class="portfolio_grid_thumbnail"><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('100,100') ?></a></div>
    
    			<div class="portfolio_grid_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></div>
    
    		<?php
    		}
    	}
    ?>

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘get_pages – grandchildren only’ is closed to new replies.