• Resolved John Webber

    (@bilion)


    I’m having an issue with text inside a heading block.
    In the editor, a straight single quote is shown. But, on the frontend, the quote is replaced by a smart (curly) quote.
    If I use an HTML block and substitute the quote for and HTML entity, then that quote is preserved.

    In the editor:

    On the frontend:

    • This topic was modified 1 year, 8 months ago by John Webber.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator janmtm

    (@janmtm)

    Hi @bilion !

    Could you clarify the issue, as the examples you shared didn’t have any text or screenshots?

    Did you mean to share that after the statements, ‘In the editor:’, and ‘On the frontend:‘ ?

    Thread Starter John Webber

    (@bilion)

    Hi @janmtm

    Yes, I did share the screenshots. Not sure what happened to them. So, I made some new ones.

    The text in the editor with the correct single quote.

    The text in on the frontend has a different quote, a symbol which my font does not have.

    The source code:
    Left side — Editor
    Right side — Frontend

    Thank you for looking into this 👍😊

    Moderator janmtm

    (@janmtm)

    Hi @bilion !

    Thank you for sharing more details. I understand better now.

    Any one of three things that you can try are:

    • Disabling plugins on the site one at a time to see if any have CSS/styling code that may be interfering here.
    • Change to a default theme, to see if that helps, in case the theme you are using may be adding styling/CSS.
    • Check if disabling wptexturize() might help. See more info here:
      https://developer.wordpress.org/reference/functions/wptexturize/
      You can disable it in your title, by adding this line to a functions.php file in your theme:
      remove_filter('the_title', 'wptexturize');

    Hope that helps!

    Thread Starter John Webber

    (@bilion)

    Excellent!

    Thank you for the link @janmtm, and helping me solve this problem.

    I just added this to functions.php in my child theme:

    // To disable entirely the curly quote replacement throughout the site
    add_filter(‘run_wptexturize’, ‘__return_false’);

    Moderator janmtm

    (@janmtm)

    Hi @bilion

    You are most welcome!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Straight single quotes are replaced by a smart (curly) quotes’ is closed to new replies.