Next Article Button

Posted in: Newsmag
Post count: 18

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

Post count: 6600

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_posthttps://codex.wordpress.org/Function_Reference/get_previous_post

Thanks

Post count: 18

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!

Post count: 18

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!

Post count: 44

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

Post count: 3343

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;
}

Result: http://screencast.com/t/iMpDeRmrG

Post count: 18

Thank you!

Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic.