admin管理员组

文章数量:1333201

I want to get previous/next post, but to keep that within the same search query (I keep the searched terms from the previous page via the URL.) Is there any way to do this? It doesn't seem to be in the function get_adjacent_post() and my quick google search wielded no interesting results.

How could I do such a thing?

I want to get previous/next post, but to keep that within the same search query (I keep the searched terms from the previous page via the URL.) Is there any way to do this? It doesn't seem to be in the function get_adjacent_post() and my quick google search wielded no interesting results.

How could I do such a thing?

Share Improve this question asked Jul 10, 2015 at 18:41 Fredy31Fredy31 8782 gold badges16 silver badges31 bronze badges
Add a comment  | 

1 Answer 1

Reset to default -1

I'm not entirely sure, but it seems like you want to store the last visited page for future use (a go back button?).

I see two ways to do this:

  1. Keep it in the URL as a get argument the same way you save the search queries. This leads to a long url, though
  2. Save it in the Browser as a cookie. This can be done via document.cookie in Javascript. Check the documentation out here: https://www.w3schools/js/js_cookies.asp

Let me know whether thats what you wanted. Kodos

本文标签: navigationGet Adjacent post by search query