New Landing How can we help? Cardinal Hide Swift Slider from Menu for Editors

Viewing 2 posts - 1 through 2 (of 2 total)
  • Posted in: Cardinal
  • #101198
    mike3run
    Member
    Post count: 44

    Hey guys, I’m making a special user with a modified ‘Editor’ role to give my client since he only wants to deal with Posts, Portfolio and Products.

    So I almost got the menu clean for them but I can’t seem to be able to hide the Swift Slider menu

    I’m trying the following code on the child theme functions:

    /* Clean up the admin sidebar navigation *************************************************/
    		function remove_admin_menu_items() {
    			$remove_menu_items = array(__('Swift Slider'),__('Contacto'));
    	  global $menu;
    	  end ($menu);
    	  while (prev($menu)){
    	    $item = explode(' ',$menu[key($menu)][0]);
    	    if(in_array($item[0] != NULL?$item[0]:"" , $remove_menu_items)){
    	      unset($menu[key($menu)]);}
    	    }
    	  }
    	add_action('admin_menu', 'remove_admin_menu_items');

    The other one being the Contact Form 7 panel which was successfully hidden from view.

    Also if I hide the Swift Slider this way will it continue to work normally?

    Thanks!

    #101682
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi Mike,

    Not sure why that wouldn’t work. The post type is registered as ‘swift-slider’.

    You could try using this plugin? https://wordpress.org/plugins/admin-menu-editor/

    – Ed

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register