Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter vespino

    (@vespino)

    I have changed this:

    $this->set_content_value();

    To:

    $this->set_value(‘content’, apply_filters(‘the_content’, $wp_post->post_content));

    in the models/post.php file as a temporary solution. If someone has a better one, one that will not reset when an update presents itself, I’d love to hear it!

    Thread Starter vespino

    (@vespino)

    Solved the problem by adding the following to my functions.php file:

    function remove_more_json_api($content) {
    if(get_query_var(‘json’)){
    global $post;
    $content = preg_replace(‘/<!–more(.*?)?–>/’,”,$post->post_content);
    }
    return $content;
    }
    add_filter(‘the_content’, ‘remove_more_json_api’, 1);

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Complete "content" in get_category_posts method’ is closed to new replies.