Tag Info

Hot answers tagged

1

These fields are created in Walker_Nav_Menu_Edit::start_el(). To change or to remove them, create a custom walker (example for another walker) that extends Walker_Nav_Menu_Edit and uses other or less fields. Then filter wp_edit_nav_menu_walker and return the class name of your walker. Pseudo-code: class Walker_Nav_Menu_Edit_Simple extends ...


1

This ended up doing the trick. function auto_hashtag( $menu_item ) { if ( ! is_admin() && $menu_item->post_parent > 0) { // url $url = $menu_item->url; $menu_item->url = preg_replace('!/([^/]+)/$!', "/#\\1", $url); } return $menu_item; } add_filter( 'wp_setup_nav_menu_item', 'auto_hashtag' );


1

The question is light on detail but I'd lean toward a custom Walker: class My_Page_Walker extends Walker_Page { function end_el( &$output, $page, $depth = 0, $args = array() ) { $output .= '<span>After the Anchor</span></li>'; } } $args = array( 'walker' => new My_Page_Walker ); wp_list_pages( $args ); That should ...



Only top voted, non community-wiki answers of a minimum length are eligible