list_pages template tag
-
Hi, I’m using the wp_list_pages template tag to list children pages in each parent page, and in the related children pages:
<div id="submenu"> <?php echo $sub_pages; ?> <?php global $wp_query; if( empty($wp_query->post->post_parent) ) { $parent = $wp_query->post->ID; } else { $parent = $wp_query->post->post_parent; } wp_list_pages("title_li=&child_of=$parent"); ?>
I’ve read the Codex and I know that to style it with CSS I need to use the following selectors:
.page_item { ... } .current_page_item { ... ?
My main problem is that when using those selectors, I alter the aspect of my main navigation menu because they use the same selectors. (See https://www.ainhoavega.com and https://www.ainhoavega.com/prueba so you know what I mean…). So I wanted to know if there’s any way to alter the “submenu” without altering the main menu. I’m guessing I’ll have to assign other selectors I just don’t know how to… am I making any sense?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘list_pages template tag’ is closed to new replies.