have_posts() ) { ?>
ID); if ($categories) { $category_ids = array(); foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id; $args=array( 'category__in' => $category_ids, 'post__not_in' => array($post->ID), 'posts_per_page'=> $int_number_of_related_posts, 'ignore_sticky_posts'=>1, 'has_password' => false , 'post_status'=> 'publish' ); } } // tags if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) { $ampforwp_tags = get_the_tags($post->ID); if ($ampforwp_tags) { $tag_ids = array(); foreach($ampforwp_tags as $individual_tag) $tag_ids[] = $individual_tag->term_id; $args=array( 'tag__in' => $tag_ids, 'post__not_in' => array($post->ID), 'posts_per_page'=> $int_number_of_related_posts, 'ignore_sticky_posts'=>1, 'has_password' => false , 'post_status'=> 'publish' ); } } if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) { } $my_query = new wp_query( $args ); return $my_query; } function ampforwp_related_post(){ global $redux_builder_amp; do_action('ampforwp_above_related_post'); //Above Related Posts ?>