Is there a way to get the related posts to show up after the post but before the comment area? Also, I can't seem to find anywhere in the coding that regulates the width of that div, and I want to make the related posts span the whole width on a no-sidebar post.
Related Posts Questions
(9 posts) (3 voices)-
Posted 1 year ago #
-
related posts without thumbnails appear before the comments, but added the thumbs after the comments for less stuff before the comments. To move them above the comments add this code to functions.php (preferably in a child theme):
add_action( 'bf_after_article', 'bf_yarpp' );
add_action( 'wp_head', 'remove_actions' );
function remove_actions() { add_action( 'bf_after_comments', 'bf_yarpp' ); }or you can edit the hooks.php (in the library/functions folder). The code example above is if you are using the yarpp plugin for related posts.
Posted 1 year ago # -
When I add in that code, my entire site goes blank. I am using the YARPP plugin, but it doesn't seem to like that coding.
Posted 1 year ago # -
just tested it and it works. you have to add at the bottom of functions.php before the ?> sign.
Posted 1 year ago # -
Hi,
I just tried the code above with YARPP, and while it does move the related posts to before the comments, I couldn't get it to be displayed in a thumbnail format. Is it possible to do this: Thumbnail format related posts, before the comments, either by YARPP or the built in function?Thanks.
Posted 1 year ago # -
If you are adding the code in a child theme you have to copy the yarpp-template-bf.php file over to the child theme folder. And you might have to enable the "Display using a custom template file" in the yarpp settings. The Show "related posts as thumbnail posts" theme setting must also be enabled.
btw, just realised the reason why driftingfocus got a blank site...because the remove_actions function was already in functions.php.
Posted 1 year ago # -
What if I don't use the code in a child theme? I really don't want to mess with having to make a child theme.
Thanks.
Posted 1 year ago # -
well, then you have to check that the template is set in the yarpp plugin and that the "Show related posts as thumbnail posts" theme setting is enabled.
Posted 1 year ago # -
Thanks a lot!!!!
Posted 1 year ago #
Reply
You must log in to post.