Hot answers tagged

1 vote

WordPress Nav Walker - Top menu link with dropdown link not clickable (dropdown opens)

Managed to fix it by updating the following: $attributes .= ( $args->walker->has_children ) ? ' class="dropdown-toggle" data-toggle="dropdown"' : ''; // THE PROBLEM! to: $...
user avatar
1 vote

Filter nav menu items HTML tags and wrap inner text with span

Just use link_before in your wp_nav_menu $args and add opening/closing span tags: $args = [ 'link_before' => '<span>', /* Add closing </span> to link_after */ 'link_after' =&...
user avatar
  • 35.5k

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