'post', 'posts_per_page' => 3,'post__not_in' => get_option("sticky_posts") ) ); }else{ $current_id = ''; $article_wrap_class = ''; global $post; $current_id = $post->ID; $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',$maizzy_default['ed_related_post'] ) ); if( ( $ed_related_post || is_404() ) && $related_posts_query->have_posts() ): ?>