• Resolved A. M. M.

    (@laius)


    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

    (@dcooney)

    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

    Thread Starter A. M. M.

    (@laius)

    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

    (@dcooney)

    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.

    (@laius)

    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

    (@dcooney)

    Please use the shortcode builder to build this query. Your parameters are incorrect.

    Cheers and good luck!

    Thread Starter A. M. M.

    (@laius)

    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

    (@dcooney)

    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.

    (@laius)

    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 7 years, 4 months ago by A. M. M..
    Plugin Author Darren Cooney

    (@dcooney)

    Sorry not sure. Opens. Ticket on the website if you want to share a link to the issue.

    Thanks.

    Thread Starter A. M. M.

    (@laius)

    Done. I’m afraid it’s still not working.

    Plugin Author Darren Cooney

    (@dcooney)

    Thanks but you entered an incorrect email in your support ticket so I cannot respond.

    Thread Starter A. M. M.

    (@laius)

    Thread Starter A. M. M.

    (@laius)

    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

    (@dcooney)

    Responded. CLosing this thread.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Only include particular taxonomy’ is closed to new replies.