Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I need to have a index page and it can pull out the title (with link), meta key description and meta key image (meta keys from custom fields) of its child pages, but only one level down.

e.g. I have a index page call WORK, and few child index PRINT, WEB. there will be some pages under PRINT and WEB as well, but I don't want them to be shown on the WORK index. I only need to have PRINT and WEB to be listed and with the meta keys.

Anybody can help please? many thanks!

share|improve this question
    
Are we talking about menus here? –  Steven Nov 24 '10 at 18:44

1 Answer 1

See: http://stackoverflow.com/questions/1045439/wordpress-retrieving-post-children

See: http://stackoverflow.com/questions/2572173/wordpress-showing-custom-data-from-child-pages-pagination

See: http://stackoverflow.com/questions/3488628/wordpress-list-pages-with-children

See: http://stackoverflow.com/questions/3780148/getting-wordpress-wp-list-pages-to-list-only-relevant-children-hard-as-hell

See: http://stackoverflow.com/questions/1160047/wordpress-list-multi-level-parent-pages-when-on-a-3rd-level-child-page

depth (integer) This parameter controls how many levels in the hierarchy of pages are to be included in the list generated by wp_list_pages. The default value is 0 (display all pages, including all sub-pages). 0 (default) Displays pages at any depth and arranges them hierarchically in nested lists -1 Displays pages at any depth and arranges them in a single, flat list 1 Displays top-level Pages only 2, 3 … Displays Pages to the given depth

child_of (integer) Displays the sub-pages of a single Page only; uses the ID for a Page as the value. Note that the child_of parameter will also fetch "grandchildren" of the given ID, not just direct descendants. Defaults to 0 (displays all Pages).

share|improve this answer
    
There's also a wp_list_pages filter that you can hook into to pull the meta value you need and display images... –  goldenapples Nov 24 '10 at 23:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.