No more updates, fails with PHP 8
By lausianne on August 5, 2023
The plugin fails with PHP 8 (breaking site), and there have been no updates for 5 years ...
Powerful and intelligent menu customizer !!!
By ugotta on July 12, 2020
ok
By fpcing on April 10, 2019
great
By matthias.wagner on November 29, 2018
Absolutely Great.
By CyberCobre on October 16, 2018
Powerful with lots of options, yet still a quick setup
By jjbbrr on September 22, 2018
Solved my problem for lengthy, tiered menu
By mlipenk on April 26, 2018
Saves a ton of time and works great in 4.9 too
By Christina (carasmo) on February 25, 2018
I am getting the current parent title by using the following php:
//* Get the menu parent id
//* https://pateason.com/wordpress-menu-top-most-parent-id/
function get_menu_parent_id( $menu_name ){
if( ! isset( $menu_name ) ) :
return "No menu name provided in arguments";
endif;
$menu_slug = $menu_name;
$locations = get_nav_menu_locations();
$menu_id = $locations[$menu_slug];
$post_id = get_the_ID();
$menu_items = wp_get_nav_menu_items($menu_id);
$parent_item_id = wp_filter_object_list($menu_items,array('object_id'=>$post_id),'and','menu_item_parent');
$parent_item_id = array_shift( $parent_item_id );
function check_for_parent( $parent_item_id, $menu_items ){
$parent_post_id = wp_filter_object_list( $menu_items, array( 'ID' => $parent_item_id ), 'and', 'object_id' );
$parent_item_id = wp_filter_object_list($menu_items,array('ID'=>$parent_item_id),'and','menu_item_parent');
$parent_item_id = array_shift( $parent_item_id );
if( $parent_item_id == '0' ) :
$parent_post_id = array_shift($parent_post_id);
return $parent_post_id;
else:
return check_for_parent( $parent_item_id, $menu_items );
endif;
} //check_for_parent();
if( !empty( $parent_item_id ) ) :
return check_for_parent($parent_item_id,$menu_items);
else:
return $post_id;
endif;
}
//get Menu label by ID post or parentID from get_menu_parent_ID();
//https://stackoverflow.com/a/26591562/1004312
function get_menu_parent_by_id( $post_id, $menu ) {
$menu_title = '';
$nav = wp_get_nav_menu_items( $menu );
foreach ( $nav as $item ) :
if ( $post_id == $item->object_id ) :
$menu_title = $item->post_title;
break;
endif;
endforeach;
return ( $menu_title !== '' ) ? $menu_title : get_the_title( $post_id );
}
//* allow shortcode in widget title
add_filter( 'widget_title', 'do_shortcode' );
//* menu parent title shortcode
function child_theme_parent_menu_title() {
$menu_location = 'primary';
$menu_parent_id = get_menu_parent_id( $menu_location );
return get_menu_parent_by_id( $menu_parent_id, $menu_location );
}
add_shortcode( 'parent-menu-title', 'child_theme_parent_menu_title' );
Very satisfied with this plugin
By Avantart on August 30, 2017
Saves a lot of time
By kleinermann on August 16, 2017