Home › Forums › General Issues › Sort by custom text(number) › Reply To: Sort by custom text(number)
You would need to output them into the links, for example;
<?php
// whatever function would be used to get the link for the current page
$link = get_the_permalink();
?>
<a href="<?php echo $link; ?>?myvar=ASC">123</a>
<a href="<?php echo $link; ?>?myvar=DESC">321</a>
then you need to alter the query run on the page to add a meta_query. You can find an example of that in the link I gave before and there is more information in the WP documentation http://codex.wordpress.org/Class_Reference/WP_Query
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.