芝麻web文件管理V1.00
编辑当前文件:/home/mybf1/public_html/ja.bf1.my/wp-content/themes/ef-practical/template-parts/related-posts.php
'ids' ) ); endif; if ( $categories ) { if ( 'tags' == get_theme_mod( 'practical_related_by' ) ) { $args = array( 'post_type' => 'post', 'ignore_sticky_posts' => 1, 'posts_per_page' => $numbers_related, 'tax_query' => array( array( 'taxonomy' => 'post_tag', 'terms' => $categories ), ), 'post__not_in' => array( get_the_ID() ), 'orderby' => $orderby_post ); } else { $category_ids = array(); foreach ( $categories as $individual_category ) { $term_related = $individual_category->term_id; $category_ids[] = $term_related; } $args = array( 'category__in' => $category_ids, 'post__not_in' => array( get_the_ID() ), 'posts_per_page' => $numbers_related, 'ignore_sticky_posts' => 1, 'orderby' => $orderby_post ); } $my_query = new wp_query( $args ); if ( $my_query->have_posts() ) { ?>
' . esc_html( $related_post_title ) . ''; ?> have_posts() ) : $my_query->the_post(); ?>
'; } } wp_reset_postdata(); ?>