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
CodePudding user response:
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.
CodePudding user response:
Try typing &
in your menu text (in place of the & symbol) and see if that helps.
CodePudding user response:
Hi