tdturn2 — 2012-06-15T14:51:26-04:00 — #1
I posted this on the WP forum, so far to no avail. I'm pretty stuck, so any help is greatly appreciated.
I'm creating a site using WP for my CMS...not necessarily creating an entire theme, but just using WP to allow the customer to make text changes. When I go to display a single post, it gives me all kinds of strange characters. For example, a space bar comes out as Â. Is there a default WP function to call that will clean this up from SQL? I've searched high and low, and I guess I do not know the correct wording for this problem.
Here's what I am currently using to display a single post in PHP:
$post_id = 19;
$queried_post = get_post($post_id);
$content = $queried_post->post_content;
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
tdturn2 — 2012-06-16T13:27:13-04:00 — #2
Just to follow up, the code here was fine, my problem was with a different portion of the page interfering.
seotrafficsearch — 2012-06-20T08:55:18-04:00 — #3
I guess your database is corrupted and you need to refresh it. Reload all the data in your CMS and see if the problem is resolved. I'm not aware of any default function in WP which can set things right for you. The reloading of content might help you out.
mittineague — 2014-09-22T05:03:27-04:00 — #4
This topic is now archived. It is frozen and cannot be changed in any way.