'page', 'post_status' => 'publish', 'posts_per_page' => -1, 'orderby' => array( 'menu_order' => 'ASC', 'title' => 'ASC', ), 'order' => 'ASC', 'post_parent' => $parentId, 'fields' => 'all', 'no_found_rows' => true, ) ); // Set classes $classes = 'page-children container relative px-4 py-8 mx-auto sm:px-6 sm:py-12 lg:px-8'; // Set wrapper attributes $wrapper = blockWrapperAttributes( $classes, $is_preview ); ?>
>
'page', 'post_status' => 'publish', 'posts_per_page' => -1, 'orderby' => array( 'menu_order' => 'ASC', 'title' => 'ASC', ), 'order' => 'ASC', 'post_parent' => $child->ID, // fixed depth: 2 levels total 'fields' => 'all', 'no_found_rows' => true, ) ); if ( count( $grandchildren ) > 0 ) { $gcHeight = 'max-h-[300px]'; $gcPad = ''; $lnkArrow = ''; } else { $gcHeight = ''; $gcPad = 'pb-4'; $lnkArrow = 'icon-chevron-right-after'; } $imgChild = ( get_the_post_thumbnail_url( $child->ID, 'medium_large' ) ) ? get_the_post_thumbnail_url( $child->ID, 'medium_large' ) : 'https://picsum.photos/seed/' . $child->ID . '/400/300?'; ?>
<?php echo esc_attr( get_the_title( $child ) ); ?>

post_title ); ?> post_title ); ?>

post_content ) { preg_match( '/

(.*?)<\/p>/i', apply_filters( 'the_content', $child->post_content ), $matches ); $firstParagraph = $matches[1] ?? ''; } ?>