Viewing 4 reply threads
  • Author
    Posts
    • #619

      When you register a post type in PikList plugin you can set the parameter for creating a top level admin menu.  Is it possible to set the link URL for that menu?

       

    • #620
      Steve
      Keymaster

      Do you mean change:  edit.php?post_type=piklist_demo ?

    • #621

      Hi Steve,

      Thanks for the response.  I’ll attempt to explain.

      I am using the Adminimize plugin to control menus and other aspects of the admin UI for roles other than Admin.  I have a CPT registered as “report”.  For non-admins I have hidden this top level menu because I don’t want them to be able to get to the edit.php page for that CPT.

      Via PikList I have created a sub-menu page for this CPT.  Because there is a submenu, the top level menu then has to be shown. It looks like Adminimize is rewriting the link on that top level but the link is not what I want.  Here are the two links:

      Top Level: MYSITE/wp-admin/admin.php?page=royalty-report-list

      Sub-menu: MYSITE/wp-admin/edit.php?post_type=report&page=royalty-report-list

      These two links are producing different query results.  I know that there are a lot of variables here and it’s difficult to see what’s happening if you can’t see the code.  What I would really like to do is just set the link on the top level menu so that it points to the correct URL.

      Thanks again and let me know if you would like login creds and I can send them to you so you could look at it.

    • #627
      Steve
      Keymaster

      I still don’t 100% understsand… but here’s an idea:

      -Create a generic Top Level menu that has no content (we do this with Piklist).

      • When admin’s log in, the CPT will be the first item in the Top Level.
      • When non-admin’s log in, the other page will be the first.

      Thoughts?

    • #628

      @steve.  Thanks for the suggestion.  I will think this though a little more.  My solution so far has been to do the following:

      1) I registered a CPT via PikList and left the show_ui parameter to true.

      2) Via a separate add_menu_page function I added a top level menu and set the capability of that menu to “Author”.  So authors will see that menu.  I set the plug parameter to the page that I wanted.

      3) Then, with the Adminimize plugin I turned off the top level menu for authors.

      The result is that the menu created with add_menu_page does not show to admins at all.  The default UI menu created by registering a CPT with PikList shows to Authors and Admins but the menu is hidden to Authors via Adminimize.

      This seems to work for now.  Thanks a lot for the replies.  I can’t wait to see what is next for PikList!

       

Viewing 4 reply threads
  • You must be logged in to reply to this topic.