Hi there,
Depends on how you are implementing related posts, but you will want to have a look at https://codex.wordpress.org/Function_Reference/is_user_logged_in to get an idea of how to approach the conditional you desire.
I am using Related Posts Slider, which can be manually inserted into the template single.php with:
<?php if(function_exists('get_related_posts_slider')) {get_related_posts_slider();} ?>
and as Schulte suggested, the user logged in call is:
<?php
if ( is_user_logged_in() ) {
} else {
}
?>
So can anyone tell me what i need to do?
Just circling back — have you tried this?
<?php
if ( is_user_logged_in() )
if(function_exists('get_related_posts_slider')) {get_related_posts_slider();}
?>