', esc_url( get_bloginfo( 'pingback_url' ) ) ); } } add_action( 'wp_head', 'bloggrid_pingback_header' ); if ( ! function_exists( 'bloggrid_similar_posts' ) ) : function bloggrid_similar_posts() { global $post; $related_post_args = array( 'no_found_rows' => true, 'update_post_meta_cache' => false, 'update_post_term_cache' => false, 'ignore_sticky_posts' => 1, 'orderby' => 'rand', 'post__not_in' => array( $post->ID ), 'posts_per_page' => 2, ); $current_cats = wp_get_post_categories( $post->ID, array( 'fields' => 'ids' ) ); $related_post_args['category__in'] = $current_cats; $related_post_query = new WP_Query( $related_post_args ); if ( $related_post_query->have_posts() ) : ?>