WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. rbergeron81
    Member
    Posted 2 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?

    https://wordpress.org/plugins/wp-tiles/

  2. Mike
    Member
    Plugin Author

    Posted 2 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
    Member
    Posted 2 months ago #

    Thank You, that worked quite well.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.