Issue #1
This line of code define( 'DISALLOW_FILE_EDIT', true);
does not go into functions.php. It should be removed from function.php and put in your config file, wp-config.php in the root of your WP install.
Here is more info on what DISALLOW_FILE_EDIT
does.
Issue #2
You are removing the menu items for admins.
if(current_user_can( 'administrator' )){
add_action( 'admin_menu','remove_menus' );
}
That is saying if the user is an admin remove your menus. Sounds like you want the opposite of that so you should be able to do something like this…
if(!current_user_can( 'administrator' )){
add_action( 'admin_menu','remove_menus' );
}
Related Posts:
- How to give custom roles the capability to edit one Menu instead of every Menu
- Adding first / last CSS classes to menus
- wp_insert_user role not working
- Hide main div if wp_nav_menu is empty
- Remove admin bar for subscribers
- how to put the logo in the center of other items in the navigation bar
- renaming an admin menu item with decimal array index number
- How to remove a metabox from menu editor page?
- Editor role cannot save custom theme options
- Hide a menu-item and its submenus and display a ‘Log in’ link if the user is logged out
- wordpress separate registration for different roles
- The best way to customize “nav-menu-template.php” to add if the ‘link_before’ is “checkbox”
- How to create different menu’s for not logged in visitors and for logged in members?
- Can we have a php “page” without a WordPress “page”?
- How to add active class to custom menu using while loop and wp_list_pages
- How to place login logout link on menu that redirects users back to current page?
- wp_delete_auto_drafts() deletes links in menus
- Replacing the NavWalker dropdown element
- How to add specific menu on a specific page or pages
- Unusable menus and “Illegal widget setting ID: nav_menu_item[]” error
- WordPress menu deletes when trying to add a hook
- Logout and redirect using the WP Menu
- Creating new menu item
- Programmatically create menu with custom link
- Custom Loop through category menu to include sub categories
- selected menu item
- wp nav menu: add attributes to menu items [duplicate]
- Add itemprop Schema.org Markup to li Elements in wp_nav_menu
- Show comments menu in dashboard only if the site has comment
- Trouble creating conditional PHP for nav menu items with children for custom Walker
- Count top level menu items
- create a select input with menus created on a custom options page
- How to give new users two specific user role options upon WordPress user registration
- Where to place PHP code that inserts (or doesn’t insert) menu item?
- Add data attribute to each li in menu
- Remove metabox from WordPress menu editor page?
- How to add an arrow to menu items has submenus
- wp_nav_menu returns menu list in ascending order. How can I arrange the menu same as dashboard menu
- custom user role wordpress – grant guest access to edit.php without insert/update/delete
- Secondary navigation menu on one page
- Remove class in nav_menu_link_attibutes filter
- WordPress Quick Question . How to Get Parent Link in Submenu in My Code
- Detecting classes, adding widgets, and adding divs in with a Nav Walker
- Add item to top of menu using a filter in functions.php
- Adding PHP in the menu
- New walker for walker_nav_menu to change inside container data
- Add data-id attribute to child page links
- Automatically add images to a menu
- wp_nav_menu not working correctly in my underscores theme
- Shortcode for Listing Users from Meta Value?
- Notice: Trying to get property of non-object
- How can I use custom menus with a Bootstrap WordPress theme?
- Adding Additional Variables on Menus Page
- Nav-Menu not showing up
- Custom navigation menu with awsAccordion
- How can I call a specific file (via php) by referencing the logged-in username?
- Dynamic Menu drops pages?
- Class for Selected Menu using wp_nav_menu
- How to create Loop code for Menu using WordPress?
- Hard-coding a shortcode as the last menu item in primary navigation?
- Add class to ul and li in wp_na
- Execute PHP code only with specific user role
- Nav Walker that shows only children and siblings of top level parent menu item
- how to changes mobile menu toggle breakpoint in WordPress
- How to display already created menus via php?
- How to Add a cutsom slug to my custom author role
- Allow a user or role to view drafts and previews, but not other admin privileges?
- Featured image in menu wordpres
- how to create a user rule that can only manage support tickets?
- How to set Nav as a default menu in wordpress
- How to let mobile navigation menu close when link is clicked?
- PHP warning with code for nav menu walker [duplicate]
- Add element after navigation element title don’t works like I expect
- String replace for Login/Logout concatenation problem in menu
- Add parent menu item in sub-menu in custom nav_walker
- Obtain wordpress user role
- How to create a sub-page of sub-page?
- Echo Option Value Based On WordPress User Role
- Widget Logic – display on page and all child
- How to list categories by page id in wordpress
- Adding button to wordpress menu
- wp_nav_menu doesn’t work in a duplicate server
- Custom user roles doesn’t apply changes
- How I can add div to menu?
- wp_nav_menu prints children with parent name
- WP Admin Bar – Get current theme name as custom menu title
- Add extra markup to WP menus
- Include administrator in author list
- Using ‘array’ method in wp_nav_menu causes it to disappear
- How to get the count for each taxonomy term
- WP_Nav Highlight Parent Issue
- Submenu opened problem
- if is_home(), change class of menu-item-225 of wp_nav_menu
- Change order that the menu is generated with wp_list_pages
- I am extending Walker_Nav_Menu: How can I get the number of children elements of the current item?
- How do I modify the with wp_nav_menu()
- Make a permalink to the most recent blog post
- Forbid certain users to access a specific page
- Custom Navigation Bar JSON Syntax Error in JSON at Position 0
- Custom nav with bootstrap dropdown