Support

Account

Home Forums General Issues Help with orderby function

Helping

Help with orderby function

  • I made a timeline using a CSV spreadsheet, imported it using WP Import, and I now wish to have the posts shown in chronological order. I have defined a unique number for each post within the spreadsheet, and I use WP Import to pull that number and place it in the body of the post. How can I use ACF to order all my posts by that unique number, (named “chrono”)?

    I have read the documentation but it might as well be in Klingon right now, I just need a little push in the right direction.

    Thank you.

  • Hi @norsninja,

    Thanks for the post.

    You will need to create a custom query with either the WP_Query or the get_post() function and pass a WP_Query object to filter the posts. You can then pass the name chrono as the meta_key.

    Please have a look at the following resource page for more info on defining this query: http://www.advancedcustomfields.com/resources/query-posts-custom-fields/

    I hope this helps.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Help with orderby function’ is closed to new replies.