Display of special characters like & in product names

This topic has 4 replies, 2 voices, and was last updated 1 years, 10 months ago ago by Rose Tyler

  • Avatar: Pawel
    Pawel
    Participant
    May 31, 2022 at 10:35

    I have a product named:
    Microsoft Office 2021 Home & Business ESD

    Unfortunately the & sign is displayed incorrectly:
    1. On bottom bar:
    Microsoft Office 2021 Home &#0…
    2. On prev/next product:
    Microsoft Office 2021 Home �…

    If I change & in product name to & then in both cases is:
    Microsoft Office 2021 Home &am…

    Can you fix this and determine what kind of sign to use?

    Regards
    Pawel

    3 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    June 1, 2022 at 08:27

    Hello,

    1/ Add the next code in functions.php of your child theme:

    add_filter('etheme_sticky_cart_title', function ($title, $full_title) {
    	return $full_title;
    }, 10, 2);

    Filter to show full title in sticky panel instead of cropped one by 30 chars.
    2/ Download navigation-prev-next.php file from this page – https://dropmefiles.com.ua/en/T6H7fGEs and upload it into /wp-content/themes/xstore/templates folder, then add the next code in functions.php of your child theme

    add_filter('etheme_prev_next_title', function ($title, $full_title) {
    return $full_title;
    }, 10, 2);

    Regards

    Avatar: Pawel
    Pawel
    Participant
    June 1, 2022 at 09:30

    Hello
    Many thanks for the solution!

    It works great and this way of displaying product titles is much better for customers.
    IMHO should be default ‘coz there will be less confusion with longer product names.

    And special chars also are displayed correctly 🙂

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    June 1, 2022 at 09:34

    Hello,

    You’re welcome! Have a nice day!

    Regards

  • Viewing 4 results - 1 through 4 (of 4 total)

The issue related to '‘Display of special characters like & in product names’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.