Hi,
We’d like to create a simple button that says “Next Article” but doesn’t show the actual article information. Is there a simple way pull the next article (in terms of prior date)?
Thanks,
Frank
Hi,
You can sue WordPress’s get_next_post() or get_previous_post() functions like the theme dose for the next/prev post feature: http://screencast.com/t/cVXOndVwbt
You can find references on these two functions on WordPress’s codex: https://codex.wordpress.org/Function_Reference/get_next_post – https://codex.wordpress.org/Function_Reference/get_previous_post
Thanks
Thanks. Dumb question …. how do I implement that within the post? So for example, at the bottom of every post I simply want a link (or button) that says “See Next Post >>” that automatically goes to the previous post.
Thanks again!
To explain further, I’d simply like to have a button or text link at the bottom of the page (centered) that says nothing but “See Next Article” and it pulls the next older article. I don’t want Next/Previous or showing article titles and images. Simply “See Next Article”.
How is it possible to do that?
Thanks so much!
The function get_next_prev_posts() used for next/prev links on single post pages is in includes/wp_booster/td_module_single_base.php line ~ 639. You play with that and alter it according to what you want.
Note: you will be changing a core file and it will be overwritten on the next update. So you need to document your changes
Hi,
Add this code: http://pastebin.com/48TQttc7 like here: http://screencast.com/t/PWNVKxOhnTj
Use this CSS, add it in Theme Panel -> Custom CSS
.my-next-button {
text-align: center;
}
.my-next-button a {
background-color: #222;
color: #fff;
padding: 7px 16px;
border-radius: 3px;
margin: 20px 0;
display: inline-block;
}
