0

In titles of custom posts the single and double quotes are displaying as HTML - eg: the string starting with & and ending with ; - in the front end, although in the backend they are just typed as regular straight ' and ".

Not sure what is causing this. Is there any way to fix it?

Sorry if I have used the wrong terminology - not familiar with this problem.

Thanks.

3
  • Try to remove wpuntexturize filter by putting this code in your functions.php - remove_filter( 'the_title' , 'wptexturize' );
    – anton
    Jun 16, 2021 at 13:27
  • Yes, that fixed it! Thanks Anton.
    – Kitka
    Jun 17, 2021 at 0:21
  • Glad it helped you. I will add it as an answer.
    – anton
    Jun 17, 2021 at 5:23

1 Answer 1

0

I think your problem related to wptexturize() function.

Description
Returns given text with transformations of quotes into smart quotes, apostrophes, dashes, ellipses, the trademark symbol, and the multiplication symbol.

Solution:

remove_filter( 'the_title' , 'wptexturize'  );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.