navigation - Get Adjacent post by search query

I want to get previousnext post, but to keep that within the same search query (I keep the searched terms from the prev

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

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742284786a4415131.html

相关推荐

  • navigation - Get Adjacent post by search query

    I want to get previousnext post, but to keep that within the same search query (I keep the searched terms from the prev

    1天前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信