Protected: มาส่อง 8 เฟสชิว แบบไหนดี ที่เหมาะมากกับสถานการณ์ปัจจุบัน

อื่น ๆ

'default', // Hover effect class
'related_post_num' => 3, // Number of related posts
'show_related_post_native_ad' => true,
'related_post_native_ad_position' => 2 // Show ad after every 2 posts
);
// Prepare the query arguments
$args = array(
'post_type' => 'post',
'post_status' => 'publish',
'post__not_in' => array( get_the_ID() ),
'posts_per_page' => 1,
'orderby' => 'rand', // Random order
);
// Get categories of the current post
$categories = get_the_category();
if ( $categories ) :
$category_ids = array();
foreach( $categories as $category ) :
if ( !empty( $category->term_id ) ) :
$category_ids[] = $category->term_id;
endif;
endforeach;
if ( $category_ids ) :
$args['tax_query'][] = array(
'taxonomy' => 'category',
'field' => 'term_id',
'terms' => $category_ids,
'operator' => 'IN'
);
endif;
endif;
$the_query = new WP_Query( $args );
if ( $the_query->have_posts() ) : ?>