Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>What I ended up doing for this, was adding a new post type that was hidden everywhere on the site except the nav menus. I then added just a single entry of that post type type, and hid some of the fields.</p> <pre><code>&lt;?php function navMenuColumns_init() { register_post_type('menu_column', array( 'labels' =&gt; array( 'name' =&gt; __('Menu Columns'), 'singular_name' =&gt; __('Menu Column') ), 'supports' =&gt; array('title'), // Doesn't need to be listed most places as it's not a valid content item on it's own 'public' =&gt; false, // Base setting. More specific settings below 'exclude_from_search' =&gt; false, 'publicly_queryable' =&gt; false, 'show_ui' =&gt; false, 'show_in_menu' =&gt; false, 'show_in_nav_menus' =&gt; true, // The only thing this is used for 'show_in_admin_bar' =&gt; false, 'has_archive' =&gt; false, ) ); $_version = (float)get_option('navMenuColumns_version', 0.0); if ($_version &lt; 1.0) { navMenuColumns_install10(); } add_action('admin_footer', 'navMenuColumns_adminFooter'); } function navMenuColumns_install10() { $navMenuPost = wp_insert_post(array( 'post_type' =&gt; 'menu_column', 'post_title' =&gt; 'Column', 'post_status' =&gt; 'publish' ), true); if (!is_wp_error($navMenuPost)) { update_option('navMenuColumns_version', 1.0); } } function navMenuColumns_adminFooter() { ?&gt;&lt;script&gt; jQuery(document).ready(function($) { // Hides most of the fields when editing a Menu Column item. $('#menu-to-edit').on('click', 'a.item-edit', function() { var $li = $(this).parents('li.menu-item'); if ($li.find('.item-type').text() == 'Menu Column') { $li.find('p.description').hide(); $li.find('p.link-to-original').hide(); $li.find('p.field-move').show(); } }); }); &lt;/script&gt;&lt;?php } add_action('init', 'navMenuColumns_init'); ?&gt; </code></pre> <p>This allows the user to add this as a normal menu item. This won't play well with functions that build the menu markup for you, but if you traverse the menu item and build the markup for you, you can target this post type with custom markup.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload