Home Forums General Issues Sort by using link


Sort by using link

  • Hi,

    It’s a long time since I used ACF and even longer since I tried to customise wordpress.
    I’m currently struggling to sort posts using a custom field value from ACF.

    Simply put, I am using the archive page to display all posts.
    At the top of the page I currently have two links, ‘Newest’ and ‘Oldest’ which when clicked, simply applies a sort order on the archived posts using orderby and order parameters in the url, i.e.

    What I need to be able to do is to have two more sorting options, ‘Price Asc’ and ‘Price Desc’. I use ACF to create additional fields within the posts such as description and price.

    I’ve read the ACF documentation about wp_query and sorting but I’m not sure how to implement this within my site.

    Any help appreciated.

    Thank you

Viewing 1 post (of 1 total)

The topic ‘Sort by using link’ is closed to new replies.