July 10, 200917 yr Hi there. I'm using wp_list_pages to display the sub pages on my portfolio page here. http://www.angelssin.co.uk/portfolio/ and when I click on the link it takes me to the sub page (the work in my portfolio that I clicked to go to) which for example would be here. http://www.angelssin.co.uk/portfolio/wolves-anime-club/ The code I'm using for the main portfolio page is <? wp_list_pages('title_li=&child_of='.$post->ID); ?> but won't work on the sub page because it has no child pages. So basically I want it to list all of the second level pages and none of the parent pages. I looked into excluding pages but that didn't work. Is there a way that I can display the current level pages and exclude the parent page at all? Any help is as always much appreciated
July 11, 200917 yr If you only want to display specific menu items, just use the include parameter with the ID numbers of the pages. If you want to display everything except certain pages, use the exclude parameter with the ID numbers of the pages.
July 15, 200917 yr It's something like this... <? wp_list_pages('title_li=&depth=1&child_of='.$post->ID); ?> The additional piece of code is depth which determines the level of heirarchy. I think thats what your asking! If you want to display them unrelated to post ID do this... <? wp_list_pages('title_li=&depth=1'); ?> That will list all pages your blog has from the 2nd level as 0 is the first level which I assume you know. Hope it helps Ryan
Create an account or sign in to comment