128 reputation
3
bio website geardev.de
location Germany
age 19
visits member for 1 year, 7 months
seen Apr 10 at 9:03

Jun
18
comment website is viewing as mobile, how do I turn this off?
Can you please mark this answer as correct then (You do this by clicking the tick on the left side)?
Jun
16
comment Error “Trying to get property of non-object” with Custom Walker for wp_nav_menu
@Rarst Thanks, I will do that!
Jun
16
comment Error “Trying to get property of non-object” with Custom Walker for wp_nav_menu
The WP_Post object that is passed as $item is different, too (Because of this, the pages have no names and the list just consists of empty <li> elements). Some serious refactoring would be needed to make these two walkers compatible.
Jun
16
comment Error “Trying to get property of non-object” with Custom Walker for wp_nav_menu
I first didn't see the answer below, look there for the solution.
Jun
16
comment Error “Trying to get property of non-object” with Custom Walker for wp_nav_menu
That is exactly what I just wanted to post :D The nav menu $args are converted to an object in wp-includes/nav-menu-template.php on line 145 by the wp_nav_menu() function. The wp_page_menu() function which is used as a fallback doesn't do that, but instead just passes the array to the Walker from the nav menu which needs the object. If you just add a $args = (object) $args on the top of the start_el function of the Walker class, you can fix this. Where would be the right place to report this to the WordPress team?
Jun
16
comment Error “Trying to get property of non-object” with Custom Walker for wp_nav_menu
If I correctly assign a menu, it works!
Jun
16
comment Error “Trying to get property of non-object” with Custom Walker for wp_nav_menu
I just did some additional testing, and I'm sure this is a WordPress bug. In my case, the nav menu I used wasn't assigned in the backend. Therefore the list pages fallback was used, it seems that then the args variable is an array. I will trace this to the source now, then tell you what I found.
Jun
16
comment Error “Trying to get property of non-object” with Custom Walker for wp_nav_menu
No, if I just use the default wp_nav_menu() function without a walker, it works perfectly. Yeah, but why is it an array then? I even var_dump'ed it, no object.
Jun
16
comment broken permalinks in responsive layout
Can you post the URL of the site? Then I can tell you where to look.