WordPress.org

Ready to get started?Download WordPress

Forums

JSON API
Since WP 3.7, order_by is broken (1 post)

  1. archon810
    Member
    Posted 3 months 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/

Reply

You must log in to post.

About this Plugin

About this Topic