Hi again Waqar !
is there a difference between a Post Relation field and a Relationship (which appear in the Relationship tab) ?
Because when I assign to a post a relationship field it dose not appear in the relationships tab...
That's a bit confusing for me.
Hi,
Thank you for waiting.
In order to have a connected search where locations related custom post types (e.g. Regions, Countries & Cities) are connected to each other and Skidomains are also connected to the Cities, you can create two seperate search views (on seperate pages) with their seperate search forms.
In first view, you can include a relationship search filter for the location-based search of properties ( screenshot: hidden link ) and in the second view, you can include a relationship search filter for the domain based search of properties ( screenshot: hidden link ).
After creating these two views on their respective pages, you can insert them as existing views on the actual search page, but only the search forms and set the results to show on the respective view pages ( screenshot: hidden link ).
To make this more clear, I'm going to share a duplicator package for a demo website in the next private reply.
regards,
Waqar
Thank you very much for your help Waqar.
I'm really interested in your package to see how you connect your search with the countries.
Your solution is actually not totally what I'm trying to do, but I'll see more clear with your package and if i have more questions, I'll come back to you. Can you send it to me please ?
many thanks,
Best regards,
Fabrice
Oh sorry, I saw your package 😉
You're very welcome Fabrice and let me know if you have any follow-up questions.
For new questions or concerns, please start a new ticket.
Hi Waqar,
I'm trying to import you duplicator package but it's asking me the database name, user and password.
I presume it's related to your archhiving, can you help me on these ? It's the first time I'm using duplicator...
Sure, I'd be happy to help.
If you're trying to deploy this duplicator packate locally on your computer, you'll need a software like "XAMPP" to be able to host website's locally.
Here is comprehensive guide on using "XAMPP" and creating a database for WordPress:
hidden link
If you plan to deploy this package on an online server, you'll need to create the database on that server, using your hosting's database manager tool.
( your hosting's support team can help you with that step )
Hi Waqar !
Your package is a great help.
In your case, is there a possibility to add a conditional display in order to displays "Countries" and "Cities" selectors ONLY if a Region has been chosen ?
Is the also a way to display 1 line at the bottom of the search form that display the resultant number of results (and not beside the selectors) ?
thanks for your help.
Another question regarding your Package. If I take the page with the 2 views, how can I setup a conditional display to have a switch button (on/off) which will display the view 1 if "on" or the view 2 if "off" ?
Hi,
Thanks for the update and glad that the package proved useful.
> In your case, is there a possibility to add a conditional display in order to displays
> "Countries" and "Cities" selectors ONLY if a Region has been chosen ?
> Is the also a way to display 1 line at the bottom of the search form that display the
> resultant number of results (and not beside the selectors) ?
- I'm afraid, there is no built-in feature available for both these changes and you'll need some custom script for both these.
For more personalized assistance around custom code, you can also consider hiring a professional from our list of recommended contractors:
https://toolset.com/contractors/
> Another question regarding your Package. If I take the page with the 2 views,
> how can I setup a conditional display to have a switch button (on/off) which
> will display the view 1 if "on" or the view 2 if "off" ?
- You can insert two conditional blocks on the page and put each view inside each block.
( ref: https://toolset.com/course-lesson/using-toolset-conditional-block )
For the conditions, you can compare the view's shortcode "Search term" with a static values, as shown in the attached screenshot.
( suppose you've used the static value 1 for the first conditional block and 2 for the second one)
After that, if you'll view the same page with "?s=1" URL parameter, first view will show, and with "?s=2" second view will show.
regards,
Waqar
Thank you for these advises Waqar !