This is my code:
<div class="col-sm-4">
[wpv-control-post-relationship ancestors="make@make_model.parent>model@model_listing.parent" url_param="wpv-relationship-filter"]
<div class="form-group col-xs-6">
<label>[wpml-string context="wpv-views"]Make[/wpml-string]</label>
[wpv-control-post-ancestor type="select" default_label="-Make-" ancestor_type="make@make_model.parent"]
</div>
<div class="form-group col-xs-6">
<label>[wpml-string context="wpv-views"]Model[/wpml-string]</label>
[wpv-control-post-ancestor type="select" default_label="-Model-" ancestor_type="model@model_listing.parent"]
</div>
[/wpv-control-post-relationship]
</div>
And this is the result:
hidden link
Feels like I am close, but something not quite right about the "model" field filter.
Of course, I am trying to get the same kind of result as the "real estate" sample site.
hidden link
Only difference is that instead of State>City>House
I have Make>Model>Listing
Any suggestions?
Hi, please edit this View in wp-admin. Scroll to the Custom Search panel and make sure the options "Let me choose individual settings manually", "Update the View results every time an input changes" and "Show only available options for each input" are selected. Test again.
If the problem is not resolved, scroll to the Query Filter panel. If you cannot see the Query Filter panel, scroll to the top right corner of the screen and click "Screen Options" to activate the Query Filter panel. Then toggle the post relationship filter open and take a screenshot. Please include this with your next reply.
Then please go to Toolset > Post Relationships and confirm you have two one-to-many post relationships set up. One should be between Make and Model, and the other should be between Model and Listing. Please take a screenshot of these relationships and include them in your next reply.
I've tried to match the View settings for the real estate site exactly but doesnt work.
Could I log in to your admin area to see how this is set up? Please provide login credentials in the private reply fields here.
It looks like your post relationships use hyphens instead of underscores, so this was incorrect:
[wpv-control-post-relationship ancestors="make@make_model.parent>model@model_listing.parent" ...
The correct syntax is like this:
[wpv-control-post-relationship ancestors="make@make-model.parent>model@model-listing.parent" ...
I made the changes and it seems to be working better now. Can you confirm?
thanks! It seems to work now.
For future reference how/where can I find the correct post relationship terms?
I didnt see anyway to check if it should be hyphens or underscores.
If you edit the post relationship and check the checkbox "I understand that changes to these settings may delete post associations in this relationship", you will find the slugs for this post relationship.