Hi I have a couple more issue. I have added a field called Contact Person, but can't seem to ad it to my template. Please could you assist me with this. And then when you click on any particular company it opens on a new page. Is it possible to open it on the same page. So the customer does not have to click on some back button if he want to search again.
Hello,
Q1) I have added a field called Contact Person, but can't seem to ad it to my template.
You will need to display the custom field "Contact Person" in content template "Template for Companies":
hidden link
See my screenshot single-field.JPG
More help:
https://toolset.com/course-lesson/creating-templates-to-display-custom-posts/
Q2) Is it possible to open it on the same page.
No, there isn't such kind of built-in feature, but it is possible to display the search form in single "company" post, for example:
edit content template "Template for Companies"
hidden link
add a view block, and choose existed view "Business Company", and display only the search form, see my screenshot search-form-only.JPG
Hi thank you for your response. I have attached a couple of screenshots to try and explain what is happening. If I choose any other field it works. But just not with "Contact Person field". It says selected field has no value. I don't know what that means. I'll try the search issue after this has been sorted. Many thanks.
Hi thank you for your response. I have attached a couple of screenshots to try and explain what is happening. If I choose any other field it works. But just not with "Contact Person field". It says selected field has no value. I don't know what that means. I'll try the search issue after this has been sorted. Many thanks. Apologies I think I have sorted the "Contact Person" issue out. I didn't fill it in on all the companies. But now when I tested the page. I'm not entirely sure it is working correctly. Please could you test it for me. Just physically type in any company name that I have listed and see if it works correctly
I have done below modifications in your website:
1) Edit content template:
hidden link
Add a shortcode block, with below codes:
[wpv-form-view name="business-company" target_id="500"]
Above shortcodes will output the search form of view "business-company", the number "500" is your home page ID.
2) in the sidebar, section "CSS editor", add below CSS codes:
input.js-wpv-submit-trigger.wpv-submit-trigger,input.js-wpv-reset-trigger{
padding: 1.5em;
border-radius: .3em;
}
see screenshot ct-css.JPG
Since your theme file will override Views button styles, above will style the submit button and reset button, you can customize it to what you want.
Aahh, wonderful. That looks great. Many many thanks. But so sorry to do this to you but I only see these things as I go along. I noticed now when you select the dropdown menu for country and/or sector it does not list all of them as I have loaded. Please see screenshot attached
Hi also noticed adding a new company a little message on the left. Please see attached. What does that mean? And what am I supposed to do?
I have done below modifications in your website:
Edit the home page:
hidden link
find and select "View Seach" block, disable option "Show only filter options that would produce results"
See my screenshot custom-search.JPG
Please test again, check if it is what you want.
More help:
https://toolset.com/course-lesson/creating-a-custom-search/
Ok thanks. So if I understand, the way it is set up now it should show all the countries that I have added. (I have added all the countries in Africa +- 55 countries) But Please see screenshot. It is only showing a couple. Or is it set to show only these few? Does my Chrome browser need to refresh or something?
I have tried the URLs you mentioned above, it is 404 error, is this problem resolved?
Please let me know if you need more assistance for it, private message box enabled, thanks
Thanks for the details, I can login your website, will update here if find anything
I can see the problem in your website, the problem is you are using "country" taxonomy in the search form, so it display only few options in the select, see it here:
hidden link
In your case, you need to add the custom field "Country" in the search form, see my screenshot country.JPG
I have setup a demo in your website, see it in front-end, it works fine:
hidden link
Hi many thanks, Again I thank you. I am assuming the same applies to the sectors section. Did you mange to check if they all appear in the drop down
Same as above you will need to use the the custom field "Sectors" in the search form, I have setup a demo in your website, I suggest you follow our document to setup the custom search form, to avoid more mistakes, you can remove those two custom taxonomies(country and Sectors), if you don't need them any more.
My issue is resolved now. Thank you!