Skip Navigation

[Résolu] Previous and next buttons to the bottom of the content template

This support ticket is created Il y a 7 années et 5 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 réponses, has 2 voix.

Last updated by frameG Il y a 7 années et 5 mois.

Assisted by: Luo Yang.

Auteur
Publications
#455033

I am trying to: add bottom navigation at content template for posts. Is that possible? there's no posibility to add to my template files because I use Ultimatum Theme.

Thank you in advanced

#455210

Dear frame,

There isn't such a feature within Views, in most cases it is defined by your theme files, and you can create a custom shortcode for it using function get_adjacent_post, and put this custom shortcode in the Content Template.

More help:
http://codex.wordpress.org/Function_Reference/get_adjacent_post

#455239

Thank you Luo!!!! Now it's solved.
I've put these two functions in my functions.php file theme. I'll writte there for someone who interests

/****** Navegacio dins dels posts ******/

function post_anterior(){

$prev_post = get_adjacent_post( true, '', true );
if ( !empty( $prev_post ) ):
echo'<div class="prevnav"><a href="';
echo $prev_post->guid;
echo'">';
echo $prev_post->post_title;
echo'</a></div>';
endif;
}
add_shortcode('post_anterior', 'post_anterior');

function post_seguent(){

$next_post = get_adjacent_post( true, '', false );
if ( !empty( $next_post ) ):
echo'<div class="nextnav"><a href="';
echo $next_post->guid;
echo'">';
echo $next_post->post_title;
echo'</a></div>';
endif;
}
add_shortcode('post_seguent', 'post_seguent');
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.