show different admin menu to different user roles

The menu items are bound to capabilities. A good overview can be found here. For example, if you do not have the capability edit_posts the menu item “Posts” would not show up. How are menu items bound to capabilites. Generally speaking: If you register a menu item using add_menu_page() or add_submenu_page() you have to assign … Read more

HTML to WordPress Menu convert

You can have a look at how the structure looks at this link – https://developer.wordpress.org/reference/functions/wp_nav_menu/ You can add your classes into those parameters and it should work. Have a look at examples like the themes that come standard with WordPress and use the Inspect tool on Chrome to see the classes that get added. Basically … Read more

how to remove the top navigation bar or header top on wordpress website?

Looks like the author didn’t include the check for menu items before calling the top nav bar. Two methods: Dashboard –> appearance –> customize –> Additional CSS add the following piece of code and save changes: #topnav { display:none; } Create a child theme and include this page neville\template-parts\partials\headers\header-tmpl-default.php. Make sure to remove the below … Read more

WordPress menu permalink redirects to wrong page

Regenerate your permalinks. Resetting permalinks rebuilds your link structure for WordPress. Often, this process must be performed after migrating a WordPress website, or when troubleshooting 404 errrors. This is accompished by choosing a different permalinks setting, and saving it. Then putting the permalink setting back to the original setting and saving it again. This is … Read more

WordPress Admin Bar Covering & Overlapping Fixed Menu Header [closed]

One solution to your problem is hiding admin bar from front-end. Maybe there is problem in your css too. To hide admin bar from front-end: To remove the toolbar from your site, go to Users > Your Profile. Scroll down to “Toolbar” and uncheck “Show Toolbar when viewing site.” Add add_filter(‘show_admin_bar’, ‘__return_false’); to functions.php of … Read more

Set the checkbox as checked by default in menu item page

You can check if the $item->menuitemlayouts has value if not set checked for the first one… <?php echo $item->menuitemlayouts ? checked($item->menuitemlayouts, ‘itemwithouticon’, true) : ‘checked=”checked”‘; ?> In the checked() I added the 3rd arg so it won’t echo twice.. <input type=”radio” name=”menu-item-menuitemlayouts[<?php echo $item_id; ?>]” value=”itemwithouticon” <?php echo $item->menuitemlayouts ? checked($item->menuitemlayouts, ‘itemwithouticon’, true) : ‘checked=”checked”‘; … Read more