ID); $number_of_related_posts = 3; if ($categories) { $cat_ids = array(); foreach ($categories as $category) $cat_ids[] = $category->term_id; $args = array( 'category__in' => $cat_ids, 'post__not_in' => array($post->ID), 'posts_per_page' => $number_of_related_posts, // Number of related posts to display. 'ignore_sticky_posts' => 1 ); $related_posts = new wp_query($args); while ($related_posts->have_posts()) { $related_posts->the_post(); global $post; $url = blogdata_get_freatured_image_url($post->ID, 'blogdata-featured'); ?>
style="background-image: url('');" >