Tagged: x
-
AuthorPosts
-
September 20, 2016 at 4:58 pm #1183759
strandbeinParticipantHello,
I inserted the code described here https://community.theme.co/forums/topic/next-prev-button-in-blog-post/ in the functions.php of my child-theme, but only the text is showing “Next Post” and “Previous Post”, no icon. What can I do?
September 20, 2016 at 5:00 pm #1183766
strandbeinParticipantThis reply has been marked as private.September 20, 2016 at 7:24 pm #1183875
JadeModeratorHi there,
Please update the code you copied here to:
add_action ('the_content', 'add_next_post_item_link' ); function add_next_post_item_link ( $content ) { if ( is_singular('post') || is_singular('x-portfolio') ) { $next_name = "Next Post <i class=\"x-icon-chevron-right\" data-x-icon=\"\"></i>"; $prev_name = "<i class=\"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; } }Hope this helps.
September 21, 2016 at 6:14 am #1184454
strandbeinParticipantCool! Thank You!
September 21, 2016 at 6:44 am #1184478
ThaiModeratorIf you need anything else please let us know.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1183759 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
