wordpress - List all Level 2 pages -
I am looking at adding two navigation methods for a website. First of all the top level should be the top level page, I have to work it correctly. The point is that I see seeing a sidebar with all the sub-pages as a list. I just can not find any method to collect sub-pages and show all search results how to work with the sub-pages of the current page.
The list needs to show all the pages what the current page is and
This will do the following for you:
$ subs = new WP_Query (array ('post_type' = & gt; 'page', 'page_on_pag' = & gt; -1); while ($ Subs-& gt; has_post ()): $ subs-> the_post (); if ($ post-> post_parent == '') is in progress; // It will skip top-level pages / The code goes here to show data;
Comments
Post a Comment