• Resolved weiz

    (@weiz)


    I create a Pod called A for example. Its type is Advanced Content Type and storage type is table.
    Under A, I created several labels including A-1, A-2, A-3…
    How and where to define the order of records as ascending or descending based on one of the labels such as A-1?
    Thanks

    https://wordpress.org/plugins/pods/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Contributor Josh Pollock

    (@shelob9)

    @wiez –

    How are you outputting this ACT?

    To order Pod “A” by field “a_1” –note that’s the field name not label – you can do it like this with the Pods class:
    $pods = pods( 'a', array( 'orderby' => 't.a_1 ASC' ) );

    or with the Pods shortcode:
    [pods name="a" orderby="t.a_1 ASC"]

    Thread Starter weiz

    (@weiz)

    Hi, Josh, I would try your way. But could you tell me where I should put your codes?
    As details as possible, for I know little about codes.
    Appreciate your help

    Plugin Contributor Josh Pollock

    (@shelob9)

    @wiez –

    Honestly, I can’t tell you that without getting more details on how you are outputting your Pods content. Can you tell me how you are creating your output for this advanced content type Pod?

    Thanks,
    Josh

    Thread Starter weiz

    (@weiz)

    Josh,

    I only mean changing order of record at the back end instead of front, because I designed it as a CMS system without front

    Plugin Author Jim True

    (@jimtrue)

    @weiz, if you are only wanting to change the order of records in the back-end, are you talking about the listing for all your pods, or on an individual record detail, you want to sort the individual fields labeled A-1, A-2, A-3, etc?

    It might help us to understand what you’re trying to do if you provided us some screenshot examples? You can link them from imgur.

    Thanks!
    Jim

    Thread Starter weiz

    (@weiz)

    Hi, Jim,

    Sorry to answer you late.
    Please check the two screenshots
    What I want to achieve is such order from up to down in Screenshot2
    WNIN01400034, WNIN01400033, WNIN01400032, WNIN01400031, WNIN01400030, but now it is just the opposite.
    Can you help me on that?
    Screenshot1 http://pan.baidu.com/s/1pJHUME3
    Screenshot2 http://pan.baidu.com/s/1kT9V1iB

    Plugin Contributor Josh Pollock

    (@shelob9)

    @weiz – Are you asking to change the default ordering in the admin or the ordering for how they will be displayed when you query for them?

    Thread Starter weiz

    (@weiz)

    Hi,Josh,

    I just want to change the default ordering in the admin. That may be a simple thing, but I am not a programmer and do not know what to do.
    Thanks

    Plugin Contributor Josh Pollock

    (@shelob9)

    There is no option in our admin for changing the default order on that screen, but you can use the filters to re-order by a field.

    There is probably a filter to set the default orderby, but no one can remember it and our documentation does not cover it.

    Hi. Not sure why this was marked as resolved. I’ve been trying to do the same thing – change the default ordering in the admin – and have not found a solution yet.

    From what I’ve seen in the plugin’s source code, there probably is no filter to set the default ordery, but there definitely should be one. Any chance this feature will be added (and documented) soon?

    Plugin Author Jim True

    (@jimtrue)

    @garyv This was marked resolved because this was a dead topic with no further response from the original poster from 4 months ago. Please do not add new commentary on resolved support tickets. Create a new ticket or in this case, put in a feature request or bug report over at:

    https://github.com/pods-framework/pods/issues

    And your feature request will get prioritized with the other work on the Pods project.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘How to change order way for the record of PODS’ is closed to new replies.