wp-bootstrap-navwalker icon indicating copy to clipboard operation
wp-bootstrap-navwalker copied to clipboard

How to add Icon, if it has dropdown menu?

Open nriddhi opened this issue 6 years ago • 2 comments

I am making a menu with dropdown, how can i add after menu name a font awesome dropdown icon, if it has dropdown menu

<li class="nav-item drop_menu"> <a class="nav-link" href="#">Services <i class="fas fa-caret-down"></i></a>
  <ul> <li><a href="service.html">Service main</a></li>
           <li><a href="service-single.html">Service single</a></li>
 </ul>
 </li>

nriddhi avatar Feb 17 '19 10:02 nriddhi

Hey @nriddhi,

I am sorry to say that I have not added a way to add icons AFTER items in the menu (even if they have no dropdown attached). The icon support here is added BEFORE items only.

I realise that adding them after items may be a better option so I will investigate that and try to find a solution. Thank you for highlighting the missing feature.

pattonwebz avatar Feb 28 '19 16:02 pattonwebz

@pattonwebz I don't know whether I got @nriddhi right but what they ask for is default Bootstrap behavior, no? There was a bug preventing the caret to show up (see #435) which was fixed in #481. I don't see how to implement this feature without a) adding inline styles or b) enqueueing a CSS file. I don't think this feature is important enough to justify adding CSS (which can easily be done by users themselves), especially because the feature only provides styles but no functionality and hence can be removed from the v5 todo list.

@nriddhi If you really want to use a Font Awesome icon instead of the default caret you can achieve this by overwriting the CSS for the default caret. Have a look at this comment for guidance.

IanDelMar avatar Jan 25 '21 08:01 IanDelMar