• Resolved tdturn2

    (@tdturn2)


    I’m creating custom pages, not from a template, 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? 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:

    <?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;
    ?>

    Any help greatly appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘cleaning posts’ is closed to new replies.