Ready to get started?Download WordPress


WP Tiles
[resolved] Grand Child Pages (3 posts)

  1. rbergeron81
    Posted 6 months ago #

    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?


  2. Mike
    Plugin Author

    Posted 6 months ago #

    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!

  3. rbergeron81
    Posted 6 months ago #

    Thank You, that worked quite well.


You must log in to post.

About this Plugin

About this Topic


No tags yet.