• Resolved luckdragon

    (@luckdragon)


    I’m writing a plugin, and want to be able to go to like
    admin.php?page=something without defining that something as a menu item, and can’t remember what.

    basically I have a section for managing a portion of my plugin that has a sub-portion, but I want the sub-portion to be a separate “page” without calling it directly from the menu because a variable from the main portion needs to be set prior. Any suggestions?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter luckdragon

    (@luckdragon)

    here’s the jest of it, I’m writing a custom plugin for a tree farm/nursery, they have several dozen types of trees, and then each of those tree types comes in several sizes

    I have admin.php?pagename=trees-types which brings up a list of the different types of trees (and allows you the option of editing them, deleting them, or managing the different sizes), what I want to do is when they click the link to manage the sizes, have it go to:
    admin.php?pagename=trees-sizes&id=XXX
    but I can’t remember, for the life of me, how to tell the plugin that trees-sizes is supposed to run a specific function without adding it to the admin menu (since the id needs to be set in order for it to work, and I don’t like the concept of them clicking on it from the menu just for it to either say “you didn’t specify a tree” or redirect them to the same page as the “tree types”.)

    Thread Starter luckdragon

    (@luckdragon)

    figured it out..

    add_submenu_page('trees', '', '', 'manage_options', 'trees-sizes', 'trees_sizes');

    just had to add a menu page with no title

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘having a "blond moment" or "brain fart"’ is closed to new replies.