Support Forum
Support › Meta Box Builder › exclude some posts from post queryResolved
Hi.
I have created a post field with MB builder.
I am guerying pages and enter some query arguments to mb builder like:
post_parent : 0
orderby : menu_order
order: ASC
These ae working.
Now i want to exclude some page ids: like 14,21,44
I cant make it.
Can you help me about this ?
Thanks.
Hello,
Please try using the post__not_in
parameter. Set it as a key in a custom attribute, and in the value box, use JSON notation to specify an array, e.g. [14, 21, 44]
.
Hi Anh.
I tried what you said i think , but cant make it work. It shows "no results found".
Here are the screens:
https://pasteboard.co/HGpS1JM1.png
Hi Burak,
Seems like we haven't added support for JSON notation for query arguments. But the dot notation works. Please try to setup like this:
https://i.imgur.com/Nes8Qgr.png
Details about dot notation can be found in the documentation.
It is working now.
Thank you very much
Hi Anh.
I have opened this topic because this way stopped working after some metabox updates i think.
My query args code is like this and this code generated with metabox builder extension:
'query_args' => array(
'post_parent' => 0,
'orderby' => 'menu_order',
'order' => 'ASC',
'post__not_in.0' => 3723,
'post__not_in.1' => 3724,
'post__not_in.2' => 3775,
'post__not_in.3' => 3776,
'post__not_in.4' => 4963,
'post__not_in.5' => 4855,
'post__not_in.6' => 4568,
'post__not_in.7' => 4570,
'post__not_in.8' => 4569,
'post__not_in.9' => 4567,
Do you have any idea about this ?
Thanks.
Hello,
Let me check it again. Thanks for your feedback.
Just fixed this issue in the Builder, please update.
Hi Anh.
I am using Metabox AIO. And i think builder is not updated in AIO.
I will be happy if you update the AIO too.
Thanks.
It's now available in the AIO. Please update!
Hi Anh.
I was using aio 1.6.14. Also still the updated aio file seems 1.6.14 in my account dashboard.
Also there is no auto update notice.
Can you check please if aio updated correctly ?
Thanks.
I forgot to change the version number on the website. Please try again.
Hi Anh.
I have updated the AIO extension but it is stil not working for me.
Can you try re-save the meta box?
Yes. It is working after re-save the metabox.
Thank you very much Anh.