درود مجدد
محتوای فایل filterid.php رو به شکل زیر تغییر دهید.
<?php
$post_id = $_GET['post_id'];
if(!empty($post_id)) {
if(!is_numeric($post_id)) {
echo "آیدی پست باید عددی باشد";
exit;
}
if("publish" != get_post_status($post_id)) {
echo "پستی با این آیدی وجود ندارد";
exit;
}
$args = array(
'ignore_sticky_posts' => 1,
'post_type' => 'book',
'p' => (int) $post_id
);
} else {
$args = array(
'ignore_sticky_posts' => 1,
'post_type' => 'book',
'posts_per_page' => 10,
'post_status' => 'publish'
);
}
$query = new WP_Qu