WordPress.org

Forums

JSON API
Since WP 3.7, order_by is broken (2 posts)

  1. archon810
    Member
    Posted 1 year ago #

    Hi,

    As you may have heard, WP 3.7 changed search and enabled relevancy as opposed to strict date desc ordering of search results.

    I have come up with a switch to toggle this on the main site, but it seems like the already existing order_by parameter (as per http://wordpress.org/plugins/json-api/other_notes/) to json-api doesn't work (anymore?).

    For example, I have tried a search term and order_by=ID as well as date, and both returned the same exact results, ordered seemingly by relevancy, probably affected by the core code changes.

    Here's the example output for both
    http://SITE/api/get_search_results/?search=ideapad&order_by=ID&include=title,date,modified
    and
    http://SITE/api/get_search_results/?search=ideapad&order_by=date&include=title,date,modified

    https://gist.github.com/archon810/8048566.

    Specifically, pay close attention to id #25038.

    Thoughts?

    http://wordpress.org/plugins/json-api/

  2. shirgans
    Member
    Posted 9 months ago #

    same problem here

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • JSON API
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic