I am trying to:
display in a view, dogs that belong to the same breed as the current post, and born on the same day.
Link to a page where the issue can be seen: hidden link
I expected to see:
only dogs in the same breed and dob as the current post.
Instead, I got:
all dogs in the same breed
By itself, the DOB filter works okay, however when paired with another post relationship filter, it does not filter as specified.
Thank you for your reply.
I think you misunderstood my issue.
on dog single, i have a couple of test views.
In the community - shows all dogs
same dob - shows dogs with the same dob as the current post
the one i am working on now is
same breed, same dob - suppose to show dogs of the same breed having the same dob as the current post.
i am able to achieve same breed, but when i add same dob, nothing happens.
in the picture above, i used 2 query filters, one for same breed and another for same dob. aren't they suppose to work together?
Thanks for the reply.
The situation has gotten worse.
Venus is a Shih Tzu, so only Shih Tzus with the same DOB should appear in the view.
Shouldn't we be tackling the issue from the View's Query Filter instead?
I have checked the post view "Same Breed" in your website.
In section "Query Filter", there are two filters:
1) Filter by post relationship:
Select posts in a Breeds Dogs relationship that are related to the Post with ID set by the shortcode attribute wpvrelatedto.
This is for get related posts by Toolset post type relationship.
2) Custom field filter
Select items with field:
Date of Birth is a number equal to VIEW_PARAM(dob)
This is for get posts on custom field "Date of Birth"
Those two filters are different, you will need to setup them manually, Views won't setup them automatically.
Thanks for the reply.
I understand why 2 filters have to be used.
But why are the filters applied twice? Once in Views, and a 2nd time in the shortcodes.
No, it is not the same filter applied twice, it is two different filters applied to same view twice, see the screenshot you mentioned above
The attribute "wpvrelatedto" is related to the first view filter as I mentioned above: https://toolset.com/forums/topic/multiple-query-filter-in-views/#post-1209268 1) Filter by post relationship:
Select posts in a Breeds Dogs relationship that are related to the Post with ID set by the shortcode attribute wpvrelatedto.
The attribute "dob" is related to the second view filter:
2) Custom field filter
Select items with field:
Date of Birth is a number equal to VIEW_PARAM(dob)