$automotive_services_related_post_counts, 'orderby' => 'rand', 'post__not_in' => array( get_the_ID() ), 'ignore_sticky_posts' => 1, ); $automotive_services_tax_terms = wp_get_post_terms( get_the_ID(), 'category' ); $automotive_services_terms_ids = array(); foreach( $automotive_services_tax_terms as $tax_term ) { $automotive_services_terms_ids[] = $tax_term->term_id; } $automotive_services_post_args['tag__in'] = wp_get_post_tags( get_the_ID(), array('fields' => 'ids') ); if ( !empty($automotive_services_terms_ids) ) { $automotive_services_post_args['category__in'] = $automotive_services_terms_ids; } $automotive_services_related_posts = new WP_Query( $automotive_services_post_args ); ?> have_posts() ) : ?>

have_posts() ) : $automotive_services_related_posts->the_post(); ?>
', esc_url(get_permalink())), ''); ?> " . wp_trim_words(get_the_excerpt(), $automotive_services_excerpt_limit) . "

"; ?>