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 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
本文标签: navigationGet Adjacent post by search query
版权声明:本文标题:navigation - Get Adjacent post by search query 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742284785a2446737.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论