8 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Sold between 1 and 100 dollars
  • United States
nfb1204 says

Does anyone know how to create a secondary menu bar that list child pages horizontally? I still want the regular drop over drop down list, but what I’m trying to accomplish is if you go to a page that has child pages, another menu bar appears right under the main navigation that list child pages. Harder to accomplish to me since wp_lis_pages/

105 posts
  • Exclusive Author
  • Bulgaria
  • Sold between 5 000 and 10 000 dollars
  • Bought between 100 and 499 items
  • Referred between 10 and 49 users
  • Has been a member for 4-5 years
DodoWeb says

Not sure if I got you right, but something like this should do the magic:

<?php $children = wp_list_pages('title_li=&child_of='.get_the_ID().'&echo=0'); ?> <?php if (isset($children)): ?> <ul> <?php echo $children; ?> </ul> <?php endif; ?>
8 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Sold between 1 and 100 dollars
  • United States
nfb1204 says

Worked Perfect! Thanks a lot! :D

8 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Sold between 1 and 100 dollars
  • United States
nfb1204 says

I got this to work as a secondary menu that only shows if a child menu is present. NOW the client asked me to do siblings on child pages. meaning if they are on the child page, they want all the related pages. So I edited that code by adding siblings. The problem is, if its a page, that has not children or siblings, it pulls all the other top level pages that aren’t related. Any ideas.

by
by
by
by
by
by