strat435
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Themes and Templates
In reply to: [Tracks] 1.30.3 breaks certain pluginsThanks so much!
Forum: Themes and Templates
In reply to: displaying subpages on a page using different templatesAfter some investigating, I was able to figure out when using
'post_parent' => 'id'you also need to use'post_type' => 'page'. Adding that additional argument allowed me to display those pages.Forum: Themes and Templates
In reply to: displaying subpages on a page using different templatesThanks! So using this Query Generator I’m trying out the following code:
<?php $args = array ( 'post_parent' => '70', 'order' => 'ASC', 'orderby' => 'menu_order' ); // The Query $query = new WP_Query( $args ); // The Loop if ( $query->have_posts() ) { while ( $query->have_posts() ) { $query->the_post(); ?> <div class="content-front-page-i-cont" id="<?php echo the_title(); ?>"> <?php the_content(); ?> </div> <?php } } else { ?>No posts found<?php } // Restore original Post Data wp_reset_postdata(); ?>This doesn’t retrieve any posts. If I do
page_idinstead ofpost_parentI can retrieve the parent page. I double checked and there are several pages that are using the queried page as a parent.
Viewing 3 replies - 1 through 3 (of 3 total)