absint( 4 ), 'post__not_in' => array( $post->ID ), 'orderby' => 'rand', ); $cat_content_id = get_the_category( $post->ID ); if ( ! empty( $cat_content_id ) ) { $args['cat'] = $cat_content_id[0]->term_id; } $query = new WP_Query( $args ); if ( $query->have_posts() ) : $related_title = get_theme_mod( 'blog_articles_related_posts_title', __( 'Related Posts', 'blog-articles' ) ); ?>