Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Bespoke WP menu and sub-menu interface using jquery WordPress

  • SOLVED

I am asking for bids on this job.

I want a menu that can be organised using the WP default admin menu editor, and which is called into the header.php file... but i require a specific front end interface for the menu and sub menu which would require javascript (possibly query) and possibly using a custom call (instead of wp_nav_menu perhaps splitting it using something like this:

<?php if($post->post_parent)
$children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); else
$children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");

if ($children && is_page()) { ?>
<ul id="subnav">
<?php echo $children; ?>
</ul>
<?php } else { ?>
<?php } ?>


Requirements:

• Clicking a menu item which is a page link takes you to that page link
• Sub Menus are visible on click only (not on hover).
• Menu items with a drop-down sub-menu will not link anywhere when clicked (as clicking a menu item is used only to toggle the visibility of the sub-menu)
• Dropdown submenu items display horizontally in a box which slides down from the menu stretching the full width of the header... pushing all the page content below down as it slides out.
• Submenu slides back up (as does the page content beneath) when another submenu is activated before the new one slides down (pushing the page content back down with it)
• Current page menu item is highlighted and dropdown sub-menu for that menu item is visible by default on all child pages

Rough examples of the effect i want:
http://www.louvre.fr/en
http://www.lexus.co.uk/#/Menu/ (click Services & Info)

I have fair experience but still struggle with php and especially javascript. I've been googling various issues around this for 2 days and am yet to find a suitable solution.

These threads have been helpful though:
http://wordpress.org/support/topic/customizing-wordpress-submenu
http://www.darrenhoyt.com/2008/02/12/creating-two-tiered-conditional-navigation-in-wordpress/ (old)
http://codepen.io/tbwIII/pen/BipEg
http://services.loudfeed.tv/2012/03/horizontal-sub-menu-wp-themes/
http://www.designchemical.com/blog/index.php/wordpress-tips/wordpress-tutorial-current-parent-menu-items-in-custom-menus/

Finally, no plugins if at all possible.

I think that covers it but let me know if more explanation is needed.

Answers (1)

2013-07-01

Arnav Joy answers:

I would like to help you for this , please send me access to your site in my mail .


OWMC comments:

hello Arnav, I have sent you an administrator login.