mirror of
https://github.com/ulaulaman/eduinaf-ajax-filter-posts.git
synced 2024-12-22 02:34:19 +01:00
Aggiunta limitazione per mostrare solo post effettivamente pubblicati
This commit is contained in:
parent
fd9b2af9c2
commit
18fd43f1cc
@ -114,6 +114,7 @@ class Ajax_Filter_Posts {
|
||||
$query = new WP_Query([
|
||||
'post_type' => $attributes['post_type'],
|
||||
'posts_per_page' => $attributes['posts_per_page'],
|
||||
'posts_per_page' => $attributes['posts_per_page'],
|
||||
]);
|
||||
|
||||
$plural_post_name = strtolower(get_post_type_object($query->query['post_type'])->labels->name);
|
||||
@ -178,7 +179,8 @@ class Ajax_Filter_Posts {
|
||||
'paged' => $page,
|
||||
'post_type' => $post_type,
|
||||
'posts_per_page' => $quantity,
|
||||
'tax_query' => $tax
|
||||
'tax_query' => $tax,
|
||||
'post_status' => 'publish'
|
||||
];
|
||||
|
||||
$response = $this->get_filter_posts($args, $language);
|
||||
|
Loading…
Reference in New Issue
Block a user