PhotoDune

help with wordpress menu

751 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 1 and 9 users
  • United States
CyberShot says

what is the best way to make a wordpress menu that has a list seperator? The seperator would need to be generated dynamically. So how is this done?

2844 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Community Moderator
  • Bought between 50 and 99 items
  • Referred between 1000 and 1999 users
  • Has been a member for 3-4 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+4 more
sevenspark moderator says

What do you mean by it needs to be done dynamically? Are you saying that a simple CSS solution wouldn’t work?

To make the CSS solution more dynamic, you can use the “CSS Classes” option in the Menu Manager. Click Screen Options and check the “CSS Classes” checkbox to activate this. Then you can apply a special class that would create a divider. That’s your easiest “dynamic” solution.

For a more advanced solution, I just finished writing a plugin that should be released soon to do with the WP3 Menu Management system (see my profile if you’re interested, I don’t want to self-promote here). One simplistic way to do this is to use a special tag/character sequence as a divider (like --divide--) and then write a custom menu walker to handle it. Kriesi’s tutorial can give you the insight you need to write the walker: http://www.kriesi.at/archives/improve-your-wordpress-navigation-menu-output

Hope that helps :)

63 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 100 and 1 000 dollars
IWDstudios says

thanks. I forgot about that tutorial. This should do the trick

by
by
by
by
by