Forums

[Plugin: JSON API] Remove Read more in get_recent_posts (2 posts)

  1. Krielkip
    Member
    Posted 11 months ago #

    Hello,

    I've got the Json Api installed. But i want to output the get_recent_posts without all the "Read more" links.

    How can this be done?

    Thanks,
    Krielkip

  2. Krielkip
    Member
    Posted 11 months ago #

    Solved:

    models/post.php:

    Replace the whole function 'set_content_value' with:

    function set_content_value() {
        global $json_api;
        global $more;
        if ($json_api->include_value('content')) {
        //	$content = $json_api->include_value('content');
          $more = 1;
          $content = get_the_content($json_api->query->read_more);
          //$content = get_the_content();
          $content = apply_filters('the_content', $content);
          $content = str_replace(']]>', ']]>', $content);
          $this->content = $content;
        } else {
          unset($this->content);
        }
      }

Reply

You must log in to post.

About this Topic