Viewing 3 replies - 1 through 3 (of 3 total)
  • you can clean up the response! with javascript: Strip HTML Tags in JavaScript

    Plugin Author dphiffer

    (@dphiffer)

    Hi jecky, if you want to do this on the server side, you could add an action handler for the post constructor like this:

    add_action('json_api_post_constructor', 'strip_json_post_html');

    function strip_json_post_html($post) {
    $post->content = strip_tags($post->content);
    $post->excerpt = strip_tags($post->excerpt);
    }

    Hi dphiffer,
    The above is not working for me, what should i do?
    i added that in my functions.php , isn’t that right?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to get post without html tags?’ is closed to new replies.