Always show wordpress submenu on responsive header menu
As I said, I’ve been missing a stupid detail in my CSS, there was a fixed height for all the li. Problem solved by removing it.
As I said, I’ve been missing a stupid detail in my CSS, there was a fixed height for all the li. Problem solved by removing it.
How to work around the bug which prevents custom menus from being deleted?
Since noone responded, here’s my solution: I copied my menubar from header.php into a new file called menubar.php and called that file with include(“menubar.php”);
Avoid changing menu query with suppress_filters => false
You should add a class to the header when the user is logged in, this way, only your css would have to change. You can do it like this in your header.php file : <header class=”header clear <?php echo ((is_user_logged_in())?’logged-in-header’:’not-logged-in-header’); ?>” role=”banner”>
In a nutshell, assuming you are using a walker to construct your menu. E.g. when customizing the start_el() method, the $item should be an object – somewhat – like the $post object. In reverse that means, you have access to post_parent property. With that information you can retrieve the title with get_the_title() easily. After your … Read more
The menu that is reversed is because it is float:right;. That’s the expected behavior when you use float:right;. This has nothing to do with WordPress itself it is a purely CSS issue.
When developing a menu on a bootstrap based theme, I now use the following Walker: ‘walker’ => new Custom_Walker_Nav_Menu class Custom_Walker_Nav_Menu extends Walker_Nav_Menu { // add classes to ul sub-menus function start_lvl( &$output, $depth ) { // depth dependent classes $indent = ( $depth > 0 ? str_repeat( “\t”, $depth ) : ” ); // … Read more
Tried with this and got the solution add_submenu_page( ‘page_main’, “Articles”, “Articles” , ‘adminstrator’, ‘edit.php?post_type=page_article’ ); Thanks
This is a good way, Mardov. Another way is to specify the subcategory id in the in_category array which is easier method. For example: if (in_category( array( 2, 4, 5 ) ) { // 2, 4 & 5 can be a category or a subcategory wp_nav_menu( array( ‘menu_class’ => ‘menu’,’menu’ => ‘Visuomenei’) ); } You … Read more