Hi @laius,
This is not possible with WP_Query.
What you need to do is loop all the taxonomy terms of the taxonomy and pass the terms to the shortcode.
Something like the opening of this post.
https://stackoverflow.com/a/3801466
I’m confused. Is there any way at all that I can exlude posts with Ajax Load More?
Use case: I have a bunch of posts with different tags, categories and a taxonomy “user”.
I created a private page for some users and want to use Ajax Load More to load SOME of the blog posts to their private page. But only those that fulfill the criteria (e.g. have a certain tag or user).
Is there any way for me to accomplish this with this plugin?
Oh ok.
Yes, please have a look at the available options in the shortcode builder.
Exclude cats taxonomy and tags.
Cheers,
I wish that would help/work. I tried the following shortcode:
[ajax_load_more container_type=”div” post_type=”post” posts_per_page=”48″ taxonomy=”user” taxonomy_terms=”subscriber1″ taxonomy_operator=”IN” taxonomy=”user” taxonomy_terms=”subscriber2″ taxonomy_operator=”NOT IN”]
But upon logging in as subcriber1 and going to my private page (where I placed the shortcode above), I can still see the posts that I explicitly assigned to subscriber2.
Please use the shortcode builder to build this query. Your parameters are incorrect.
Cheers and good luck!
Is there another short code builder than the one in the plugin itself? Because that’s the one I used. If it is not correct, please advice how to make it correct.
The shortcode builder does not build multiple taxonomy queries like that.
It would look like this.
[ajax_load_more taxonomy="tax-name:tax-name" taxonomy_terms="term-name:term-name" taxonomy_operator="IN:NOT IN" taxonomy_relation="OR"]
This time I tried it w/ copy&paste, as the builder did not provide said result. Is this correct?
[ajax_load_more taxonomy=”user:user” taxonomy_terms=”subscriber1:subscriber2″ taxonomy_operator=”IN:NOT IN” taxonomy_relation=”OR”]
Because if so, it’s still not working.
-
This reply was modified 8 years, 9 months ago by
A. M. M..
Sorry not sure. Opens. Ticket on the website if you want to share a link to the issue.
Thanks.
Done. I’m afraid it’s still not working.
Thanks but you entered an incorrect email in your support ticket so I cannot respond.
Could you please resend your reply? Something seems to have been wrong with my email address, but it’s working now.
Responded. CLosing this thread.