JC Submenu
JC Submenu plugin allows you to automatically populate your navigation menus with custom post_types, taxonomies, or child pages.
Next Milestone 5K
Unlock Exact Install Count
See the precise estimated active installs for this plugin, calculated from real-time ranking data.
- Exact install estimates within tiers
- Track install growth over time
- Milestone progress predictions
Rank Changes
Downloads Growth
Upgrade to Pro
Unlock 30-day, 90-day, and yearly download history charts with a Pro subscription.
Upgrade NowReviews & Ratings
Tracked Keywords
Showing 1 of 1| Keyword | Position | Change | Type | Updated |
|---|---|---|---|---|
| submenu | 89 | — | Tag | 11 hours ago |
Unlock Keyword Analytics
Track keyword rankings, search positions, and discover new ranking opportunities with a Pro subscription.
- Full keyword position tracking
- Historical ranking data
- Competitor keyword analysis
Track This Plugin
Get detailed analytics, keyword tracking, and position alerts delivered to your inbox.
Start Tracking FreePlugin Details
- Version
- 0.9.1
- Last Updated
- Aug 17, 2020
- Requires WP
- 3.0.1+
- Tested Up To
- 5.3
- PHP Version
- N/A
- Author
- James Collings
Support & Rating
- Rating
- ★ ★ ★ ★ ★ 4.6
- Reviews
- 49
- Support Threads
- 0
- Resolved
- 0%
Keywords
Upgrade to Pro
Unlock keyword rankings, search positions, and detailed analytics with a Pro subscription.
Upgrade NowSimilar Plugins
Frequently Asked Questions
Common questions about JC Submenu
`
Page 1
- Page 1.1
- Page 1.2
Page 2
- Page 1.3
`
Creating a split menu section for this example, you would set the start depth of 1, this means that when you are viewing any page or child page of Page 1 the split menu would output related items only:
`
Page 1
- Page 1.1
- Page 1.2
`
and if you were viewing any page or child page of Page 2 the split menu section would be:
`
Page 2
- Page 1.3
`
** Wordpress Split Menu Widget **
JC Submenu plugin comes with a widget titled “Split Menu Widget” which allows you to output your split menu within a wordpress sidebar.
It is located under Appearance > Widgets in your wordpress administration area.
Widget Settings:
Choose Split Menu widget from the list of avaliable widgets
Select Menu – Choose the menu you wish to split
Start Level – Choose the starting depth to display
Menu Depth – Choose how many levels you wish to display
Show Parent – Choose to display the split menu’s parent item
Show Hierarcy – Choose to display a flat or nested list
Trigger Depth – Choose how many levels of children you would like to display in relation to the activate page, 0 = show all. (Added in v 0.62)
** Split Menu Action **
JC Submenu plugin comes with a built in wordpress action to easily output a split menu anywhere within your theme.
`
`
hierarchy – Whether to display a flat list instead
start – Menu depth you wish to split from
depth – Amount of levels you wish to display
show_parent – Whether to display the parent item
trigger_depth – how many levels of children you would like to display in relation to the activate page, 0 = show all. (Added in v 0.62)
menu_class – Set the class of the menu element
menu_id – Set the id of the menu element
container – what to wrap the ul in
container_id – Set the id of the container element
container_class – Set the class of the container element
It is located under Appearance > Widgets in your wordpress administration area.
Widget Settings:
Choose Section Menu widget from the list of avaliable widgets
Select Menu Part – Choose the menu section you wish display
Menu Depth – Set how many levels of the menu you wish to display
Show Parent – Choose whether to display the parent item
** Menu Section Action **
JC Submenu plugin comes with a built in wordpress action to easily output a section of a menu anywhere within your theme.
`
`
hierarchy – Whether to display a flat list instead
start – Menu item you wish to display from
depth – Amount of levels you wish to display
show_parent – Whether to display the parent item
menu_class – Set the class of the menu element
menu_id – Set the id of the menu element
container – what to wrap the ul in
container_id – Set the id of the container element
container_class – Set the class of the container element
** Menu Section Shortcode **
Display a section of your wordpress menu within your visual editor using wordpress shortcodes.
`
[jcs_menu_section menu="" hierarchy="1" start="1" depth="5" show_parent="0" /]
`
menu – Choose the menu you wish to display
hierarchy – Whether to display a flat list instead
start – ID Menu item you wish to display from (can be found by hovering over the menu item within the wordpress menu admin page)
depth – Amount of levels you wish to display
show_parent – Whether to display the parent item
How do i automatically populate menu items
JC Submenu WordPress plugin takes the hassle out of creating menus, by removing the manual addition of items and allowing you to automatically populate menu items from posts, categories, tags, custom post types, and taxonomies.
Each with many customisable options allowing you to refine your final menu.
** Enabling Automatic Menu Population **
Once you have the JC Submenu installed, from the menus section
Add a menu item that you wish to have posts as a submenu and click on save menu.
When the page reloads, click on the arrow on the right hand side of the menu item to display the advanced options.Tick the checkbox labelled JC Submenu – Automatically populate submenu to show an accordion of population options.
** Populate WordPress Menus with Posts **
Click on the section labelled Populate from post type.
* Post Type – Make sure Post is selected from from the drop down labelled Post Type
* Taxonomy – If you wish to only show posts from a certain category/taxonomy choose the appropriate taxonomy from the drop down labelled Taxonomy (otherwise choose All), If you wish to filter it down further by choosing a term within that taxonomy choose the appropriate term from the drop down labelled Terms.
* Order – Choose which field you want to order and how you’d like it ordered Ascending or Descending.
* Post Limit – Setting the number of posts to display, Set to 0 if you wish not to have a limit.
** Populate WordPress Menus with Taxonomies **
Click on the section labelled Populate from taxonomy.
* Taxonomies – Choose the taxonomy from the drop down you wish to populate from.
* Order – Choose which field you want to order and how you’d like it ordered Ascending or Descending.
* Hide Empty Terms – Hide terms that do not have any posts / custom posts.
** Populate WordPress Menus with Child Pages **
Click on the section labelled Populate from pages.
* Parent Page – Choose the parent page to fetch the child pages.
* Order – Choose which field you want to order and how you’d like it ordered Ascending or Descending.
What Actions and filters are avaliable in this plugin
** jcs/menu_item_args **
jcs/menu_item_args filter is used to edit wp_nav_menu options on a per menu item basis allowing a truely customizeable menu output.
Example – Display Menu Item Image
This example shows how to add an image before a menu item depending on that items object type.
`
add_filter( 'jcs/menu_item_args', 'jcs_menu_item_args', 10, 2);
function jcs_menu_item_args($args, $item){
switch($item->object){
case 'page':
// add blue 10 pixel image before the menu item name
$args->link_before = '<img alt="" src="http://placehold.it/10x10/0000FF" />';
break;
case 'term':
// add green 10 pixel image before the menu item name
$args->link_before = '<img alt="" src="http://placehold.it/10x10/00FF00" />';
break;
case 'post':
// add red 10 pixel image before the menu item name
$args->link_before = '<img alt="" src="http://placehold.it/10x10/FF0000" />';
break;
}
return $args;
}
`
** jcs/item_classes **
Add extra classes to menu items containing their item type.
`
add_action( 'jcs/item_classes', 'jc_edit_item_classes', 10, 3 );
function jc_edit_item_classes($classes, $item_id, $item_type){
$classes[] = "item-$item_type";
return $classes;
}
`
** jcs/item_title **
Display the dynamic menu type at the end of the item title.
`
add_filter('jcs/item_title', 'jc_edit_item_title', 10, 3);
function jc_edit_item_title($title, $item_id, $item_type){
if($item_type == 'term'){
$title .= ' (term)';
}elseif($item_type == 'page'){
$title .= ' (page)';
}else{
$title .= " ($item_type)";
}
return $title;
}
`
How do i use JC Submenu when my theme uses a custom menu walker
JC Submenu allows you to disable its custom menu walker making it compatible with themes which uses there own menu walkers.
To enable compatability with other menu walkers add the following code into your themes functions.php file.
`
// enable compatibility with theme custom menu walkers
add_filter('jcs/enable_public_walker', 'jc_disable_public_walker');
function jc_disable_public_walker($default){
return false;
}
`