Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8993307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:09:58+00:00 2026-06-15T23:09:58+00:00

I am working on a plugin, which creates a couple of Virtual pages, and

  • 0

I am working on a plugin, which creates a couple of Virtual pages, and I wish these links to be available in Menu admin page, to let users have the liberty to add them as they create menus.

I want to add a Meta box in Menu administration, very similar to Page/Category meta boxes, to let users select what page to add in their menu.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:09:59+00:00Added an answer on June 15, 2026 at 11:09 pm

    Apparently, the only possible research is in the core itself.

    Here, /wp-includes/nav-menu.php, we can get how to insert the meta box:

    add_action('admin_init', 'so_13875144_nav_menu_meta_box');
    
    function so_13875144_nav_menu_meta_box() {
        add_meta_box( 
            'my-custom-nav-box', 
            __('Custom Box'), 
            'so_13875144_display_menu_custom_box', 
            'nav-menus', 
            'side', 
            'default' 
        );
    }
    
    function so_13875144_display_menu_custom_box() {
        /* Not sure about this global var */
        //global $_nav_menu_placeholder;
        //$_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval($_nav_menu_placeholder) - 1 : -1;
        ?>
            <p id="menu-item-custom-box">
                <label class="howto" for="custom-menu-item-custom-box">
                    <span><?php _e('URL'); ?></span>
                    <input id="custom-menu-item-custom-box" name="menu-item[<?php echo $_nav_menu_placeholder; ?>][menu-item-custom-box]" type="text" class="code menu-item-textbox" value="my text" />
                </label>
            </p>
        <?php
    }
    

    nav menu meta box

    But, the hard part, which I haven’t managed to make work, is to save the value.
    This is the file /wp-admin/nav-menus.php that has to be studied.

    Tried to hook into the action wp_update_nav_menu, but the custom meta box input field is not being passed into $_POST.

    WordPress Answers may have some hint: https://wordpress.stackexchange.com/search?q=wp_update_nav_menu

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a jquery plugin which takes json data from the php
I am working on a wordpress plugin which allows user to enter name of
Current tinyMCE version (3.5.2). Hi, I am working on a custom plugin which adds
I'm working on a plugin project in which I'm using Eclipse background processing. What's
I'm working on a plugin and there's a view which has a treeviewer. I
I'm working with the jQuery Validation plugin and I wrote the following code which
I am using the ajaxform() plugin, which so far is working well. However, my
I'm using the Twitter bootstrap-typeahead plugin with an HTML form: http://twitter.github.com/bootstrap/javascript.html#typeahead which is working
I've implemented a slideshow using the Cycle plugin, which is working in all browsers
I'm currently working on a wordpress 2.9.2 plugin (my first) that creates additional custom

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.