Add breadcrumbs at bottom of post and pages with previous and next in renew stack

Is there any option provided in this theme to add previous and next breadcrumbs to add it at the bottom of the page or post. If possible can you share any sample code for renew stack . It will be helpful.

Thanks

Hello @skumar006,

Thanks for asking. :slight_smile:

Post navigation in Renew theme is not a default featured offered. However you can have post navigation with some custom development work. However, please note that custom development falls outside the scope of support we can offer though I can give you some direction that can be used as a base framework to get started.

First you need to setup child theme. You can use following resources to download and setup child theme.

Download Child theme from following source: https://theme.co/apex/child-themes

Please take a look at following article to setup child theme:

Next, add following piece of code in child theme function.php file:

add_action ('the_content', 'add_next_post_item_link' );

function add_next_post_item_link ( $content ) {
	if ( is_singular('post') ) {
		$next_name = "Next Post <i class=\"x-icon-chevron-right\"></i>";
		$prev_name = "<i class=\"x-icon-chevron-left\"></i> Previous Post";
		$next_link = get_next_post() ? '<a style="float: left;" href="' . get_permalink( get_next_post()->ID ) . '">' . $prev_name . '</a>' : '';
		$prev_link = get_previous_post() ? '<a style="float: right;" href="' . get_permalink( get_previous_post()->ID ) . '">' . $next_name . '</a>' : '';
		$posts = '<div class="wp-post-navigation-next">'.$next_link.$prev_link.'</div>';
		return $content . $posts;
	} else {
		return $content;
	}
}

Please note that I have shared some steps to help you get started. You will need to use CSS to style the Next/Previous links. I would also like to let you know that custom code can break the layout and functioning of website. We won’t be able to provide support in that scenario. Beyond this, we won’t be able to help you in this customization request. In case you are not comfortable with programming, please get in touch with a developer to assist you.

Thanks for understanding.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.