Apostrophes and hyphens get replaced in WordPress ? solutions

When I moved TricksWay from blogger to WordPress some of major problem accord like hosting and all after solving these issue I relaxed and feel like Got Heaven but problem not end here all of my coding and script which I previously share with my blogger blog creating problem when copy and paste.
Actually codes that all change their "charset" value and format of coding is dump and stop to give proper response. This is a head pain for me because when I fix it from my control panel and reload my web page it's come again to error and not possible to do edit all coding related post and fix issue manually than I think about actual problem and got the main function changes, I realize Apostrophes and hyphens get replaced and change the actual parameter which is define my previous blog. I fixed it and now everything is working well. If you are facing same problem than read this article hope it's help to you.

Source code changes

Why Apostrophes and hyphens get replaced ?

It's replaced when you install custom plugins or header character verify different version of "charset".
If your code works well in previous pages and not at new web pages than check your old page and copy following similar code:

<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

or

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

Easily you can get this code via head of source code ( open web page and right click than open source code).

Than add into your new web page or replace if already specified. If your are using WordPress than it can be done by edit header.php

After successful of this step open your functions.php and add below code. ( Don't paste this code between any function must paste after/before close function).

remove_filter( 'the_title', 'wptexturize' );
remove_filter( 'the_content', 'wptexturize' );
remove_filter( 'the_excerpt', 'wptexturize' );
remove_filter( 'comment_text', 'wptexturize' );

Save your functions.php and everthing is work like charm...Stay with us for more updates.

Himanshu is a young engineer living in India. Currently working at Cognizant as a Senior Engineer. He is an ethical hacker & blogger too, doing lots of crazy stuff... If you seem interesting, go through his portfolio: www.himstar.info : "Open Source. Millions of open minds can't be wrong!

One comment: On Apostrophes and hyphens get replaced in WordPress ? solutions

Leave a reply:

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Site Footer

Sliding Sidebar

We are India’s largest Startup Community


We are team of ' Delhi Startups ' , most active startup community with strict spam policy.
We are making !deas happen..for future, business and jobs without charging anything, with connecting entrepreneurs.. It's a reason to trust on us.
Come and join or subscribe, we will defiantly give a reason to like us.

Our Facebook Page