Support » Plugin: WP Tiles » Grand Child Pages

  • Resolved rbergeron81


    If I set post_parent, it works and shows the child pages of a particular page, but it doesn’t show the child pages of those child pages (grandchild pages). How can I get it to show both child and grandchild pages either using the shortcode or a page template?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mike Martel


    Hi there! WordPress does not come with a convenient way to get grandchildren in get_posts or WP_Query – only in the get_pages function with the child_of parameter. But you can pass a raw array of posts to WP Tiles in a page template like this:

    $pages = get_pages( array( 'child_of' => $parent_id ) );
    wp_tiles()->show_tiles( $pages );

    Let me know if you have any luck!

    Thank You, that worked quite well.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Grand Child Pages’ is closed to new replies.