Title: Only include particular taxonomy
Last modified: July 21, 2017

---

# Only include particular taxonomy

 *  Resolved [A. M. M.](https://wordpress.org/support/users/laius/)
 * (@laius)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/only-include-particular-taxonomy/)
 * Hi there,
 * I am trying to load only the blog posts that (only) contain a particular taxonomy.
   Current short code: [ajax_load_more post_type=”post” posts_per_page=”48″ taxonomy
   =”Testuser” button_label=”Load more”].
 * Currently, ALL posts are being loaded. I would like to exclude all posts that
   do not include the taxonomy “Testuser”. How can I accomplish this?

Viewing 14 replies - 1 through 14 (of 14 total)

 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/only-include-particular-taxonomy/#post-9342754)
 * Hi [@laius](https://wordpress.org/support/users/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](https://stackoverflow.com/a/3801466)
 *  Thread Starter [A. M. M.](https://wordpress.org/support/users/laius/)
 * (@laius)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/only-include-particular-taxonomy/#post-9343251)
 * 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?
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/only-include-particular-taxonomy/#post-9343254)
 * Oh ok.
    Yes, please have a look at the available options in the shortcode builder.
 * Exclude cats taxonomy and tags.
 * Cheers,
 *  Thread Starter [A. M. M.](https://wordpress.org/support/users/laius/)
 * (@laius)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/only-include-particular-taxonomy/#post-9343266)
 * 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.
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/only-include-particular-taxonomy/#post-9343269)
 * Please use the shortcode builder to build this query. Your parameters are incorrect.
 * Cheers and good luck!
 *  Thread Starter [A. M. M.](https://wordpress.org/support/users/laius/)
 * (@laius)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/only-include-particular-taxonomy/#post-9343272)
 * 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.
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/only-include-particular-taxonomy/#post-9343278)
 * 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"]`
 *  Thread Starter [A. M. M.](https://wordpress.org/support/users/laius/)
 * (@laius)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/only-include-particular-taxonomy/#post-9343280)
 * 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.](https://wordpress.org/support/users/laius/).
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/only-include-particular-taxonomy/#post-9343291)
 * Sorry not sure. Opens. Ticket on the website if you want to share a link to the
   issue.
 * Thanks.
 *  Thread Starter [A. M. M.](https://wordpress.org/support/users/laius/)
 * (@laius)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/only-include-particular-taxonomy/#post-9343303)
 * Done. I’m afraid it’s still not working.
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/only-include-particular-taxonomy/#post-9346097)
 * Thanks but you entered an incorrect email in your support ticket so I cannot 
   respond.
 *  Thread Starter [A. M. M.](https://wordpress.org/support/users/laius/)
 * (@laius)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/only-include-particular-taxonomy/#post-9346885)
 * Plz use [info@getscanr.com](https://wordpress.org/support/topic/only-include-particular-taxonomy/info@getscanr.com?output_format=md).
 *  Thread Starter [A. M. M.](https://wordpress.org/support/users/laius/)
 * (@laius)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/only-include-particular-taxonomy/#post-9350515)
 * Could you please resend your reply? Something seems to have been wrong with my
   email address, but it’s working now.
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/only-include-particular-taxonomy/#post-9350911)
 * Responded. CLosing this thread.

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Only include particular taxonomy’ is closed to new replies.

 * ![](https://ps.w.org/ajax-load-more/assets/icon-256x256.png?rev=2944639)
 * [Ajax Load More – Infinite Scroll, Load More, & Lazy Load](https://wordpress.org/plugins/ajax-load-more/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ajax-load-more/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ajax-load-more/)
 * [Active Topics](https://wordpress.org/support/plugin/ajax-load-more/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ajax-load-more/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ajax-load-more/reviews/)

## Tags

 * [exlude](https://wordpress.org/support/topic-tag/exlude/)
 * [taxonomy](https://wordpress.org/support/topic-tag/taxonomy/)

 * 14 replies
 * 2 participants
 * Last reply from: [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * Last activity: [8 years, 9 months ago](https://wordpress.org/support/topic/only-include-particular-taxonomy/#post-9350911)
 * Status: resolved