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

  1. rbergeron81
    Posted 1 year 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 Martel
    Plugin Author

    Posted 1 year 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 1 year ago #

    Thank You, that worked quite well.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Tiles
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.