Hello Shaun,
Your code with a global block should be like this:
function custom_post_arrows() {
if ( is_single() ) {
echo do_shortcode('[cs_gb id=123]');
}
}
add_action('x_before_the_content_end', 'custom_post_arrows');
Or if you follow the code provided by Christian that should work too.
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 x-icon-chevron-right" data-x-icon=""></i>';
$prev_name = '<i class="x-icon x-icon-chevron-left" data-x-icon=""></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 let us know how it goes.