Output sort number in wp menu list item?
As I edited above, I found the answer myself. Just use: $item->menu_order
As I edited above, I found the answer myself. Just use: $item->menu_order
I checked out the walk method from the original Walker class source at WordPress and used that to get my result. I added a couple of more things to it, including: Adding first and last classes to the every ul in the navigational menu. Adding odd and even classes to every li relative to the … Read more
Conditional Nav Menu Inside Nav Menu Across Multisite Sites
It’s stored in metadata, there are four meta fields: _thumbnail_id and _thumbnail_hover_id – store attachment ID, _menu_item_image_size – store selected image size, _menu_item_image_title_position – store label position, but you can get stored values from this properties: $item->thumbnail_id, $item->thumbnail_hover_id, $item->image_size, $item->title_position. Check the menu_image_nav_menu_item_filter() function in menu-image.php
I’ve found a solution which works great. I ended up copying the bbPress Reply Walker class which was an extension of the WordPress walker class, and modifying some of the parameters to meet my needs. I had to also make my own function for listing replies, similar to bbPress’s list replies function. The list replies … Read more
Checked the variable with isset to see whether or not it contained a value: $element->classes[] = ( isset($element->current) || isset($element->current_item_ancestor )) ? ‘active’ : ”; This solved the notice issue. And this seems to do the trick. Guess I over thought things here. Now I can start adding some content in Arabic and see start … Read more
WordPress menu walker – Get parent item text inside end_lvl function
As you know, walker is server side method while jQuery is client side method. You need to choose what will be the best in any situation. If you don’t use a dedicated Walker for each menu, default WordPress Walker will run so why don’t use your own and adapt it via jQuery for the different … Read more
via walker class – problem is solve
You have to hook into wp_nav_menu_items and build your own menu there. A little guide for working with this hook can be found at wpbeginner.