ID; if( $silvermountain_header_trending_page != $current_id && $silvermountain_header_popular_page != $current_id && is_single() && 'post' === get_post_type() ){ $cats = get_the_category( $post->ID ); $category = array(); if( $cats ){ foreach( $cats as $cat ){ $category[] = $cat->term_id; } } $related_posts_query = new WP_Query( array( 'post_type' => 'post', 'posts_per_page' => 6, 'post__not_in' => array( $post->ID ), 'category__in' => $category ) ); $ed_related_post = absint( get_theme_mod( 'ed_related_post',$silvermountain_default['ed_related_post'] ) ); if( $ed_related_post && $related_posts_query->have_posts() ): ?>