WordPress.org

Ready to get started?Download WordPress

Forums

JSON API
order_by argument (5 posts)

  1. svalerie
    Member
    Posted 3 years ago #

    I've been going about this for a while, and re-reading the documentation, but can't seem to crack it.

    Trying to retrieve posts and order them by post titles, but the order_by argument doesn't seem to have an effect (at least not how I'm doing it)

    http://example.com/?json=get_category_posts&category_id=4&order_by=title

    Any hints, tips very appreciated. (btw - order=asc, working like a charm, but have been trying other values for order_by and no joy so far).

    Many thanks

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

  2. sparklette
    Member
    Posted 3 years ago #

    I have the exact problem too. Trying to sort posts by title to no avail. Any solution would be greatly appreciated. Thanks.

  3. theseanz
    Member
    Posted 3 years ago #

    Just wanted to chime in and say I am having this issue, also. I'm about to dig into the code, but I'd rather not as my PHP skills are intermediate at best.

  4. dougestey
    Member
    Posted 2 years ago #

    I'm also having this issue.

  5. rbarona
    Member
    Posted 2 years ago #

    Hi!

    I have the same problem, but I find the solution! ;)

    The argument "order_by" is without "_". It works "orderby"

    http://example.com/api/get_recent_posts/?dev=1&order=desc&orderby=title

    Tried on your website and tell me if is working ;)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags