array( array( 'taxonomy' => 'category', 'terms' => wp_get_post_categories( $post->ID ), ), ), 'posts_per_page' => 8, 'post__not_in' => array( $post->ID ), 'post_status' => 'publish', ) ) ); if ( ! $r->have_posts() ) { echo '
  • ' . esc_html__( 'None ..', 'anice' ) . '
  • '; } else { foreach ( $r->posts as $recent_post ) : $post_title = get_the_title( $recent_post->ID ); $titl = ( ! empty( $post_title ) ) ? $post_title : __( '(no title)', 'anice' ); ?>