Replicating Menu Functionality
-
The concept is the following: I need a new post type which will organise another post type into a hierarchical structure ( as well as store additional information which is why I cant just use the menu system ).
What I’m trying to do its replicate how the WordPress menu functionality works, and then extend on it. The two sections I need to replicate is the accordion on the left hand side which allows you to view and search different post types (will need to be restricted to only one post type), and the drag and drop menu functionality to modify the order and hierarchy on the right.
I’ve already created the new post type. The next step is to get the search box to display on the new custom post type; I’ve located the following code which I believe outputs the search box:
<form id="nav-menu-meta" class="nav-menu-meta" method="post" enctype="multipart/form-data"> <input type="hidden" name="menu" id="nav-menu-meta-object-id" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" /> <input type="hidden" name="action" value="add-menu-item" /> <?php wp_nonce_field( 'add-menu_item', 'menu-settings-column-nonce' ); ?> <?php do_accordion_sections( 'nav-menus', 'side', null ); ?> </form>
However this does not show up. Changing the ‘nav-menus’ several different settings did not work at all. The function’s documentation is not really that helpful : https://codex.www.ads-software.com/Function_Reference/do_accordion_sections
Any help getting this (and then the menu functionality) to work would be appreciated!
- The topic ‘Replicating Menu Functionality’ is closed to new replies.