• I have a page (“resources”). It has 3 subpages (“children”) : “video”, “books”, “essays”.

    One of the subpages (“essays”) has it’s own subpages (grandchildren of “resources”), which are the individual essays.

    The page “resources” uses a page template that pulls all the posts that are children and grandchildren of “resources”, or for that matter any deeper nested subpage as well. I would like to only display the children and not the grandchildren (not the individual essays). How can i do that?

    I’m super new to PHP, and don’t have a clue here. Any help is appreciated, & thanks in advance!

    <?php if(have_posts()) : ?>
    
    								<?php 
    
    									$category_id =  get_post_meta($post->ID, "page_id", true);
    
    									$limit = get_option('portfolio1_limit', 9);
    
    									$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    
    									query_posts("cat=$category_id&showposts=$limit&paged=$paged");
    
    									$i = 1;
    
    									$culomns = get_option('portfolio1_columns', '3');
    
    									$padtop = get_option('portfolio1_thumb_height', '150')/2 - 28;
    
    									$padleft = get_option('portfolio1_thumb_width', '270')/2 - 37;
    
    								?>
    
    								<?php while(have_posts()) : the_post(); 
    
    								?>
  • The topic ‘Displaying children "subpages" but not grandchildren’ is closed to new replies.