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 badges1 Answer
Reset to default -1I'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:
- Keep it in the URL as a get argument the same way you save the search queries. This leads to a long url, though
- 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
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742284786a4415131.html
评论列表(0条)