-1

I'm trying to use the special character "&" in my wordpress menu items. For example having a menu item called "Call & Contact". The issue is the "&" get sign gets converted to "&". I'm not sure if this is a WordPress specific issue or it's my theme (roots / sage 10).

Backend image:screenshot of wp backend menu item

Frontend image:screenshot of wp frontend menu

3 Answers3

0

I"m not 100% sure if that is to solve your problem since there is limited info have been provided but i assumed problem occurs because of your theme and its paginate_links() function.

So what you can try is to add this code to your functions.php file but please do that either in a child theme or with a snippet plugin (easier) because if you copy it somehow wrong your website will crash.

    add_filter('paginate_links', 'mmx_pagination_fix');
function mmx_pagination_fix($link) {
    return str_replace('#038;', '&', $link);
}

Let me know if it helps. If it doesn't simply delete the code so it doesn't load unnecessarily.

Selcuk xD
  • 94
  • 9
0

Try typing & in your menu text (in place of the & symbol) and see if that helps.

BMartin
  • 117
  • 5
  • Hey BMartin! Thank you for the response. I put in & instead of & but when I click save it just converts back to the & special character. – Ben Smallwood Jul 29 '22 at 18:26
0

If you use windows you can use Windows Key + . to open emoji popup but you can use & for type & character

General Grievance
  • 4,555
  • 31
  • 31
  • 45
  • Hey Armin! Thank you for the response. I put in & instead of & but when I click save it just converts back to the & special character. – Ben Smallwood Jul 29 '22 at 18:26