Support » Plugin: Adminimize » Hide/disable nav-menus.php + standard post type?

  • jockebq

    (@jockebq)


    Hi,

    I am trying to disable the ability to reach nav-menus.php + standard post type for a specific role.
    I tried adding “nav-menus.php” under Custom slug under Menu Options. Doesn’t work.

    Another thing I cannot figure out is how to disable the standard post type, while leaving the ability to still post custom post types.
    Like disabling post-new.php but still be able to reach post-new.php?post_type=event

    Please help me out!

    Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Frank Bueltge

    (@bueltge)

    The slug of an custom post type is more as his page, like this structure edit.php?post_type=my_cpt. However after a save of the Adminimize settings you should see all menu items inside the settings.

    Also it should work that you disable the standard post type and not a CPT, because the plugin checks the referer and not only the page. In my tests works this without problems.

    jockebq

    (@jockebq)

    Hi Frank,
    I see the custom post types, and it is possible to disable them, which means I cannot access them. But I cannot disable the standard post type. The standard post type is not available in the Menu (i guess my theme hasn’t that activated). But I can still visit /post-new.php and get to that page.
    But adding post-new.php under Menu like this:
    Image of Adminimize options

    Does nothing at all?

    EDIT: Also this one that I am trying to hide, a button inside a custom post type:
    <input id=”background-video-button” class=”button” value=”Select/Upload Video” type=”button”>
    I tried #background-video-button without success under Post / Custom.

    • This reply was modified 1 year ago by  jockebq.
    • This reply was modified 1 year ago by  jockebq.
    jockebq

    (@jockebq)

    Do you have any Idea why i cant hide standard post, is it Because it is not enabled in my theme? I want it disabled when visiting the URL. Same with nav-menu.php

    Plugin Author Frank Bueltge

    (@bueltge)

    Is the menu item for default post inactive via your theme? Adminimize read the menu items from the menu-variable. Only the items of this variable are inside the settings. The slug for default post is edit.php, if you will add this to the custom options.

    jockebq

    (@jockebq)

    Yes, the menu item for default post is inactive in my theme, so it is not visible in Adminimize.
    I can still reach it from /post-new.php
    I tried adding edit.php to Menu Options, and checked all three options, including the one called Add New (Slug: post-new.php)[__10]. But I can still reach /post-new.php with a user who has this role.

    Weird that it is not working!
    Do you know the setting to add to disable /nav-menus.php too?

    jockebq

    (@jockebq)

    I tried adding this to the theme’s functions.php:
    add_posts_page( $page_title, $menu_title, $capability, $menu_slug, $function);

    This makes the Posts item show up in the dashboard menu. But in Adminimize it is not shown under Menu Options at all?

    I have tried to Update Adminimize clicking Update Options, but it doesn’t show?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Hide/disable nav-menus.php + standard post type?’ is closed to new replies.