With such custom requirements it’s unlikely you will just happen upon a snippet to achieve it. This is considerable chunk of customization and working with hierarchical data is always challenging.
When you are working with wp_list_pages()
what is happening in background is that it compiles data and passes to instance of Walker_Page
class, that extends generic Walker
class and is how typically output of hierarchical data is done in WP.
wp_list_pages()
can accept instance of custom walker, however putting one together takes some PHP chops. You might explore it some and extend your question with more specifics of desired output and how far you got with walker.
Otherwise you will have to build output completely from scratch.
Related Posts:
- Page template query with WP_Query
- How to display page content in a page template?
- Does WordPress generate an automatic page for post formats?
- Single page theme that uses pages for the content
- Trying to list out child pages with WP_Query
- Order by menu structure
- Targeting specific pages in the loop
- What are the differences between “Latest Posts” and “Static Page”?
- WP_Query not retrieving by random order under parent
- Set if condition with wp_nav_menu
- Set order of returned items in the WP_Query() class/function
- Search pages that are a child of the current page
- How to display summary content from a Page (Not a Post) on another page
- Serve specific “template” page at any URL that ends in its slug
- Display custom tags on pages that have a specific page parent
- Is there a reason why Pages are not publicly_queryable?
- Why post__not_in is ignored?
- Exclude parent with child pages from WP_Query
- Create a loop on my pages with new “WP_Query”
- All blog data on a page using custom query gives 404 for page 2 and onward
- When listing child pages run out of memory
- WPQuery calling specific posts problem
- WP_Query with multiple orderby NOT working with ASC and DESC, what’s wrong?
- Display specific page (that is child) content on parent page
- Get query results with a page title
- How to get current page nearest parent id?
- How to get main menu only with wp_nav_menu
- Unable to paginate a custom page query
- How to create single page site in WordPress
- Determine if ID is page or post and query the ID
- How to query for a page, get data, then query for child pages of that page
- Get list of all Grandchild Pages
- Custom query does not find pages
- How to get pages of parent (non-recursive)?
- WP Query and multiple pages
- How to use custom page for all posts with custom url, call another directory?
- display the children of the post using the current page as the main parent
- pages shortcode filtering by category
- How to create page that lists tags by initial letter?
- Get a page ancestor from a most viewed list
- How can I use a specific wordpress page template if certain words are used in page title [closed]
- Category Archive not working for pages
- Retrieving category pages from subcategory returns empty sets
- Issue in If else condition [closed]
- Show parent’s child and also child’s, child on a page?
- get contents and permalink from a specified page
- Get next post when using pagination with WP_Query?
- WordPress pagination returns the same posts
- How to write short code with if else to get page_id?
- Exclude a category if post is only in that category using wp_Query
- Too slow when using both ‘tax_query’ and ‘meta_query’ both in WP_Query
- Use of caller_ get_ posts
- Tax_query terms ID’s using variable
- Order posts by tags count?
- Querying Multiple Custom Taxonomy Terms
- WP_Query search for whole words
- WP_QUERY returns empty set when fired from a WP-CRON scheduled event
- WP_Query, tax_query and term_meta: How to?
- How do I reset this wp_list_categories query?
- How to pass many ids in post__in?
- Query with a meta value inside a given range
- Pagination of a WP_Query Loop in a child-page page template
- Add condition of user capability in WP_query
- How do I run through a WordPress loop called from a filter function?
- How to display user order by role
- WP_Query | Tax_Query Relation | Unable to use ‘OR’ as it then allows all products, help me finish my query?
- Get all fields inlcuding “ACF” (Advanced Custom Fields) columns in wp_query
- WP_query : Force last posts number over Reading Settings
- Order by most used tag
- How to display the number of posts in a category using WP Query
- Is wp_reset_postdata always necessary?
- wp_query: implicit paging? I get less posts that I should
- Specific html within wordpress loop
- WP Query Meta Value – How To Identify Specific, Unique Values?
- Get user first name from custom endpoint
- Shortcode Not Working in Slider When Added To Post Title
- Displaying pages on an archive page
- Multiple pagename WP Query
- How I can repeat 2 HTML templates in a WordPress Query?
- Meta query with compare by more than 2 fields
- Offset WP_Query by negative 1
- WP_Query orderby random do not repeat infinite scroll – one loop
- meta_query returning excluded result
- How to pass the current content of $wp_query to a new page?
- Passing a SQL query to the WP Query
- Why when I using infinity scroll the one post loads over and over?
- WP Query with meta queries
- Taxonomy archive, categorised by other taxonomy, not hiding empty taxonomies
- Migrating mysqli query to wp_query
- Second WP_Query loop shows data from main query
- My entry results are not consistently alphabetized
- Speed up WP_query with meta comparing dates
- How to order by datediff in WP loop?
- Custom query for tag and custom tag from 2 post type
- wpdb get_results() returns only 2 rows
- Search Functionality broken by the wp 4.2 update
- Taxonomy related query not working
- Multiple Orderby is not working right
- How to include custom fields in wordpress search
- Extend search query to search meta keys values based on search string