• I’m just trying out WordPress with the new twenty nineteen theme. I like to write in Markdown so I’m using JetPack with its Markdown support. I’ve noticed that although WordPress correctly handles single quotes (apostrophes) in my Markdown, turning them into curly apostrophes, it does not handle double quotes; I have to enter curly left quotes and curly right quotes manually instead. Is this a bug?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello,

    Would you mind providing us with the link to your site and a little more clarification of your requirement? So that we can offer you with a possible solution.

    Thank you.

    @mattneub Hello Matt,

    I was facing the same problem with all themes (including Twenty Nineteen) after I decided to switch to Markdown. I was able to “fix” this by adding the following to functions.php:

    /** Disable Curly Quotes */
    remove_filter('the_content', 'wptexturize');
    remove_filter('the_title', 'wptexturize');
    remove_filter('the_excerpt', 'wptexturize');

    You can add (or remove) any filters as per your preferences. I hope you and others find this helpful.

    • This reply was modified 5 years, 7 months ago by iu7489.
    Thread Starter mattneub

    (@mattneub)

    @iu7489 Where would I add those lines? What function do I add them to? Thanks

    Moderator James Huff

    (@macmanx)

    If you’re using a Child Theme, add the filters to your Child Theme’s functions.php file.

    If you are not using a Child Theme, the functions.php file will be overwritten in each Twenty Nineteen update, so use the https://www.ads-software.com/plugins/code-snippets/ plugin instead to add the filters.

    Thread Starter mattneub

    (@mattneub)

    @macmanx I understand, but my question is, _where_ within the code? Code inside _functions.php_ needs to be inside some function, doesn’t it? So what function? Or am I being told that this code will run even if placed at the top level of the file?

    Moderator James Huff

    (@macmanx)

    You can just put all of that on a new line inside the functions.php file.

    Thread Starter mattneub

    (@mattneub)

    @iu7489 That does the exact opposite of what I want. Instead of enabling curly quotes on Markdown-generated posts, it disables curly quotes everywhere.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘markdown and smart quotes’ is closed to new replies.