WordPress.org

Ideas

Add page to menu from page editor

  1. Matthew
    Inactive

    12345

    I think it would be cool if someone made a plugin or WordPress added it as a feature in an upcoming version to make it so that you can add the page that you are editing straight onto your menu. You would not need to go to the menu section to do it.

    Posted: 3 years ago #
  2. NancyN
    Member

    good idea, eliminate the detour thru "Appearance"

    Posted: 3 years ago #
  3. Kyle Maurer
    Inactive

    This is an intriguing idea and would not, at least in a basic iteration, be very difficult. It would be relatively simple to add a page to an existing menu from the edit page. Specifying where in that menu the item should be placed would be more complex as you wouldn't have the drag and drop menu interface.

    I suppose you could simply have the page be added to the menu as the final listed item and be required to go to Appearance->Menus to change its location. This means the feature would only be useful to folks who want the item added to the end of the menu.

    Or perhaps the Order field could be used to specify the page's place in the menu.

    I like this idea and am tempted to try making it real, it just strikes me that it could be difficult to make it useful given the limitations I described above.

    Thanks for sharing.

    Posted: 3 years ago #
  4. Matthew
    Inactive

    12345

    I think I am going to try to develop this.

    All that I need to do is create a custom metabox for the page editor, and then figure out how to make the page add to the menu.

    I could also add a new tab (visual, text, menu) and then you could add it to the menu in the menu tab.

    Posted: 3 years ago #
  5. Kyle Maurer
    Inactive

    I'm glad you're taking a stab at it. Let me know how it goes and if you need any help. I'd love to see a github repo for this.

    I agree that a custom field could work best. Perhaps adding a select field in the same box as the Order field would make the most sense? It would work like the Page Template select field and be dynamically populated with the registered menus.

    At the same time, this option would only allow for adding the page to a single menu and some users may want it added to multiple menus. Also worth considering would be what happens when a user adds the page via your meta box and then later removes it via the standard menus interface. Would the page's meta value be updated? Is it even a static value or just a field which triggers an action one time?

    Again, just more thoughts to consider. Best wishes.

    Posted: 3 years ago #
  6. Matthew
    Inactive

    12345

    Thanks for the feedback.

    I will open a GitHub repo as soon as possible to get working on this.

    Posted: 3 years ago #
  7. Matthew
    Inactive

    12345

    I just opened a repo on GitHub for it. It doesn't have anything on it yet.

    I also added you as a collaborator so that you can help me with it if you want.

    Also, do you have any name suggestions for the plugin?

    Posted: 3 years ago #
  8. Kyle Maurer
    Inactive

    Awesome! Thanks. Looking forward to helping find a solution for this.

    Posted: 3 years ago #
  9. Matthew
    Inactive

    12345

    @BrashRebel, I just found a plugin that does just this. https://wordpress.org/plugins/wp-quick-menu/

    Posted: 3 years ago #
  10. Kyle Maurer
    Inactive

    Right you are. Looks like they've done a pretty good job of tackling this issue. Would you agree? I'm not exactly certain at this point what I would do differently. Are you intending to continue developing an alternative or does that plugin satisfy your needs sufficiently?

    Posted: 3 years ago #

RSS feed for this topic

Reply »

You must log in to post.

  • Rating

    12345
    2 Votes
  • Status

    This idea is under consideration