I want to add arrow (or anything like ...) after every menu item that have children menus.

I know that there is some JavaScript solutions. But for some reasons (stability and ...), I don't want to use it. Also CSS .menu-item-has-children:after selector isn't good for me.

so is there any way I could do it using PHP.

  • 1
    Not sure what you mean by a PHP solution - this is a styling question. You may want to look into custom nav walkers as they allow you to manipulate markup and add classes if you need to do so. – WebElaine Sep 24 '18 at 21:04
  • Why don't you use a background-image on the li element? – Pim Sep 25 '18 at 8:12
  • @WebElaine I think he means manually inserting an image with PHP... – Pim Sep 25 '18 at 8:16
  • I don't know what is nav Walker. can you explain the solution as an answer? @WebElaine – Mohammad Kazemi Sep 25 '18 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.