12 posts
  • Has been part of the Envato Community for over 6 years
  • Has sold $1+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
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
  • Has referred 10+ members
  • Has sold $5,000+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Sells items exclusively on Envato Market
+2 more
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; ?>
12 posts
  • Has been part of the Envato Community for over 6 years
  • Has sold $1+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
nfb1204
says

Worked Perfect! Thanks a lot! :D

12 posts
  • Has been part of the Envato Community for over 6 years
  • Has sold $1+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
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.

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by