Custom CSS on mobile

try adding overflow:hidden to the .wrap @media only screen and (max-width: 767px) #wrap { width: 100% !important; overflow: hidden; }

Change hover to onclick on menu

Just found how to do it. The solution is very simple, it all was just about playing around the “slideToggle” function on the same object I was working on in the main question. Only one problem won’t disappear, if I click once, and then mouseout, the submenu will be open-able via hover. You’re forced to … Read more

Add top parent page id to body class

found it: add_filter( ‘body_class’, ‘dc_parent_body_class’ ); function dc_parent_body_class( $classes ) { if( is_page() ) { $parents = get_post_ancestors( get_the_ID() ); $id = ($parents) ? $parents[count($parents)-1]: get_the_ID(); if ($id) { $classes[] = ‘top-parent-‘ . $id; } else { $classes[] = ‘top-parent-‘ . get_the_ID(); } } return $classes; }