• Resolved BrenFM

    (@brenfm)


    This is an regular occurrence for me and wondered if anyone might have some bright ideas.

    On a lot of our theme designs we feature accordion pages – that is children pages that show up as content on the parent page in a jQuery based pop-out accordion.

    I define an accordion page as being any that uses a template file (in this case page-accordions.php) and use a custom WP_Query to show children pages that have the meta_value of page-accordions.php for the meta_key _wp_page_template.

    Next I use Tim Holt’s Page List Plus plugin (fantastic work by the way, Tim!) which allows me to exclude these accordion pages from any wp_list_pages generated nav menu (typically in a sidebar menu).

    What I’d like to know is – can anyone think of a way I can automagically exclude pages from wp_list_pages when they are using a particular template according to the _wp_page_template meta key? I know wp_list_pages is pluggable, but I’m just not sure where to start.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Excluding pages by template in wp_list_pages’ is closed to new replies.