<?php
get_header();
?>
<?php
$args = array(
'post_type' => 'post',
'posts_per_page' => -1,
'tax_query' => array(
array(
'taxonomy' => 'category', //(string) - Tên của taxonomy
'field' => 'slug', //(string) - Loại field cần xác định term của taxonomy, sử dụng 'id' hoặc 'slug'
'terms' => array( 'nostrum-et-maiores-perspiciatis-est-qui'), //(int/string/array) - Slug của các terms bên trong taxonomy cần lấy bài
'include_children' => true, //(bool) - Lấy category con, true hoặc false
'operator' => 'IN' //(string) - Toán tử áp dụng cho mảng tham số này. Sử dụng 'IN' hoặc 'NOT IN'
),
)
);
$query = new WP_Query($args);
$i = 1;
while ($query->have_posts()): $query->the_post();
echo $i;
?>
<h5><?php the_title(); ?></h5>
<p><?php the_tags(); ?></p>
<?php
$i++;
endwhile;
wp_reset_query();
?>
<?php
get_footer();
?>
<?php
get_header();
?>
<?php
$args = array(
'post_type' => 'post',
'posts_per_page' => -1,
'tax_query' => array(
array(
'taxonomy' => 'lionel', //(string) - Tên của taxonomy
'field' => 'term_id', //(string) - Loại field cần xác định term của taxonomy, sử dụng 'id' hoặc 'slug'
'terms' => array( 31), //(int/string/array) - Slug của các terms bên trong taxonomy cần lấy bài
'include_children' => true, //(bool) - Lấy category con, true hoặc false
'operator' => 'IN' //(string) - Toán tử áp dụng cho mảng tham số này. Sử dụng 'IN' hoặc 'NOT IN'
),
)
);
$query = new WP_Query($args);
$i = 1;
while ($query->have_posts()): $query->the_post();
echo $i;
?>
<h5><?php the_title(); ?></h5>
<p><?php the_tags(); ?></p>
<?php
$i++;
endwhile;
wp_reset_query();
?>
<?php
get_footer();
?>
<?php
get_header();
?>
<?php
$args = array(
'post_type' => 'post',
'posts_per_page' => -1,
'tax_query' => array(
array(
'taxonomy' => 'lionel', //(string) - Tên của taxonomy
'field' => 'name', //(string) - Loại field cần xác định term của taxonomy, sử dụng 'id' hoặc 'slug'
'terms' => array( 'Lionel1'), //(int/string/array) - Slug của các terms bên trong taxonomy cần lấy bài
'include_children' => true, //(bool) - Lấy category con, true hoặc false
'operator' => 'IN' //(string) - Toán tử áp dụng cho mảng tham số này. Sử dụng 'IN' hoặc 'NOT IN'
),
)
);
$query = new WP_Query($args);
$i = 1;
while ($query->have_posts()): $query->the_post();
echo $i;
?>
<h5><?php the_title(); ?></h5>
<p><?php the_tags(); ?></p>
<?php
$i++;
endwhile;
wp_reset_query();
?>
<?php
get_footer();
?>