skip to Main Content

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

Answers


  1. 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.

    Login or Signup to reply.
  2. Try typing & in your menu text (in place of the & symbol) and see if that helps.

    Login or Signup to reply.
  3. If you use windows you can use Windows Key + . to open emoji popup but you can use & for type & character

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search