creating a dynamic menu in wordpress
Use a # for the URL in a Custom Links item and then the menu item will not link anywhere, but can be used for a top menu item. See http://codex.wordpress.org/WordPress_Menu_User_Guide
Use a # for the URL in a Custom Links item and then the menu item will not link anywhere, but can be used for a top menu item. See http://codex.wordpress.org/WordPress_Menu_User_Guide
Have you tried using the checkboxes / add Pages / add Categories rather than custom links when adding items to the menu? It’s sorta the opposite problem, but I’ve run into issues where WP does not recognize custom links as “this page” – maybe the fix is the same. ** EDIT ** I just ran … Read more
I think it would be easier for you if you’d stick with the old menu output and used css to emulate your submenu columns. You can left-float the elements in your submenu (while giving them an appropriate with – e.g. 33% for 3 columns), which sorts them horizontally rather than vertically, but otherwise will give … Read more
From looking at the Codex, you should be able to just pass the fallback_cb parameter as false to have wp_nav_menu return nothing. So something like: <?php wp_nav_menu( array( ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’, ‘fallback_cb’ => FALSE ) ); ?>
You can accomplish this in at least two ways: 1) Via CSS. Use the appropriate class selectors (e.g. current-page-item, current-page-parent, current-page-ancestor) to display the appropriate sub-menu. 2) Separate calls to wp_list_pages(). The first call will have a depth=1 argument passed, and the second will determine the ID of the current parent page, and output accordingly, … Read more
Are you using CSS3? You could use: ul#navmenuid:first-child { border-left: 1px; } Or you could use (any LI that immediately follows an LI): ul#navmenuid li { border-left: 1px; border-right: 1px; } ul#navmenuid li + li { border-left: 0; } Or you could use (any LI that follow an LI, even if not immediately): ul#navmenuid li … Read more
The implementation of menu items depends on your theme. For newer or well maintained and updated theme it is usually implementation of Custom Menus feature. For the rest it could be anything from auto-generated list of pages to custom theme settings page in admin.
for category: li.current-category-ancestor li.current-cat for menu: li.current-menu-item for page: li.current_page_item li.current-page-ancestor for post: li.current-post-ancestor For more details: http://codex.wordpress.org/Dynamic_Menu_Highlighting
I would solve this using the plugin Advanced Custom Fields. 1) create an ACF item with the following config view larger 2) it will show a metabox when editing a Post, where you can select which Page the post should appear 3) in your page template, adapt this code to your needs <?php // START … Read more
Roee, there’s no particular setting or plugin to do that kind of stuff, it’s all about how your theme is designed and developed. You might be able to achieve this using some custom CSS if you’re good enough with that. Basically what you have to do is find out the :hover state of a particular … Read more