How can i get inverted coma instead of apostrophe in wordpress content frontend -
i write inverted comma on admin tinymce editor on frontend displays apostrophe when use:
the_content();
but when use
echo get_the_content();
it display inverted comma.
and when use
$content=get_the_content(); $content=apply_filters( 'the_content', $content ); echo $content = str_replace(']]>', ']]>', $content);
it again display apostrophe instead of inverted comma.
i try replace apostrophe comma using
str_replace("’", "'", $content);
it doesn't work. suggestions?
i have tried one
<?php $content = get_the_content(); $content = apply_filters( 'the_content', $content ); $content = str_replace(']]>', ']]>', $content); $content = html_entity_decode($content);//added code echo $content = str_replace("’", "'", $content); ?>
adding
$content = html_entity_decode($content);
this code works me. still didn't know why wordpress convert.
Comments
Post a Comment