Results 1 to 3 of 3
Thread: cleaning posts
Jun 15, 2012, 11:51 #1
- Join Date
- May 2012
- Lancaster, KY
- 0 Post(s)
- 0 Thread(s)
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); echo $content;