• Resolved Herbert van-Vliet

    (@remarkno)


    I would like to export a set of posts where either the post’s slug, or the parent post’s slug is “ovk”, and naturally I would only like to export those posts that are published.
    I think that means using a combination of ANDs and ORs, but I haven’t been able to manage this just yet. How would I go about this?

    Note: posts normally do not have the “parent post” capability that pages have, so I have turned this on (on init: $object = get_post_type_object(‘post’); $object->hierarchical = true). I am assuming that the WP_Query that the plugin creates to select the objects to export handles this just fine.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Herbert van-Vliet

    (@remarkno)

    I did some additional testing, and this seems to not select what I would like:

    parent slug equals “ovk”
    OR
    slug equals “ovk”

    If I use only: parent slug equals “ovk”, it selects the 16 posts.
    If I add: slug equals “ovk”, it selects just 1 post.
    The expected number is 17.

    This is without status “Published” – there are some revisions that I would like to exclude, but that is now separate from the above mentioned issue.
    I assume it means adding: status equals “publish”, but with an AND somehow? The query would be (slug = “ovk” OR parent_slug = “ovk”) AND status = “publish”.

    Plugin Author vjinfotech

    (@vjinfotech)

    Hi,

    Thanks for getting in touch

    Please contact me on [email protected] and I will investinage issue soon as possible

    Let me know if you have any questions

    Thanks and have a nice day

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Filtering: AND OR’ is closed to new replies.