Hello,
i’ve created a query string with URL parameters to sort the query using a URL via a button.
post_type=post&orderby=title&order={{dc:url:param key=“order” fallback=“asc”}}
Then my Button URL uses this key ?order=desc and all works fine.
My issue is - if I have this set up in the middle of a page, upon clicking the sort button it refreshes the page & returns the users back to the top, to have to scroll down and see the now sorted results.
If i try and anchor text the button with #postlist
e.g. ?order=desc#postlist
to bring the user back down the page, the button reloads the page using only the anchor #postlist and the URL parameter is ignored.
So my question is - is there a way to have my sort parameter URL work with an anchor text?
Or is their a method of enabling users to sort results midway down the page without sending them back to the top with each selection?
Thanks