If no author posts, echo out some text
Maybe this do the trick, put your if statement inside the function to check if the number of posts retrieved is >= 1, if so begin the foreach else print a message function get_related_author_posts() { global $authordata, $post; $authors_posts = get_posts( array( ‘author’ => $authordata->ID, ‘post_type’ => ‘kenniscentrum’, ‘post__not_in’ => array( $post->ID ), ‘posts_per_page’ => … Read more