• Resolved alexpoccard

    (@alexpoccard)


    Hello,

    I’m struggling a lot with the order by feature in the relationship fields.

    I have the following pods:
    – Streamers
    – Streamer Loadouts

    They have a bidirectional field to link them together. One streamer can have multiple streamer loadouts.

    I want the streamer loadouts to be ordered by publish date desc. From recent to old so that i can then create some sort of archive chronological.

    In Streamer Loadouts –> Loadouts (name of field) –> Order By i’m adding: “t.post_date DESC” with the quotes and it’s not working. I’ve tried basically all combinations with or without quote, with t. etc.

    Whatever i try, the related items are sorted by publish date ASC when i want them to be DESC.

    Would love if you could help me figure this out as i would like to use the Order By feature on many other pods items.

    screenshot:
    https://warzoneloadout.games/wp-content/uploads/2022/10/2022-10-13_09h36_16.png

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter alexpoccard

    (@alexpoccard)

    Hello! I’m really struggling with this, and i need to be able to sort the related items by post date (From new to old) to create relevant content.

    Would love if someone could just tell me the syntax needed in the “Order by” on the related field because everything i try is not working.

    Thanks in advance!
    Alex

    Plugin Support Paul Clark

    (@pdclark)

    For input type, select “Multi Select (basic selection)” instead of “List View (with reordering), then resave the Pod and resave the fields.

    For orderby, use CAST(t.post_date as DATETIME) DESC

    That caused ordering to work here.

    Thread Starter alexpoccard

    (@alexpoccard)

    Thank you it worked!

    Thanks so much ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Order by Publish Date’ is closed to new replies.