Skip Navigation

[Resolved] Creating map only showing different country

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 0 replies, has 1 voice.

Last updated by Minesh 3 weeks, 3 days ago.

Assisted by: Minesh.

Author
Posts
#2791276

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - you can try to add taxonomy "Associated Country" and add the country names as term and for Canada post/page you should assign Canada term for Maxico post/page you should assign Maxico term - does that makes sense?

#2791442

You guys sometime have a great support but recently gets really frustrating to solve any issue. Instead of checking things properly and offering a solution, either find a broad excuse that hits the dead end.

I don't want to "try" and see anything. I am asking for a solution here without breaking the current structure. Can I get anyone else assigned to my tickets who is willing to help?

#2791595

Should I create another ticket about the same topic to be assigned by another support person who can help?

#2791985

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Please note that we can not suggest the structure or rework and correct your strcture that is beyond the scope of our support policy. We can suggest the possible solution which you may check and see if that fits as per your requirement ad need your co-operation.

There is nothing personal but Somtimes we have to reply as such to clients as such and clients will not get reply or help as per thier expectation but the fact is that at some stage clients needs to compromise or get in touch with our contractors to build such feature/function as per their requirement that is obvuously the thing we can not help with.

For now - to identify to what country the page/post belongs to you will require taxonomy where you can add term names as country name and attach the term name to your desired post/post so we can identify that post X belongs to country X.

So, if you will add country names as terms (Canada,UK,USA) and you have post/page which belongs to Canada and have attached the term Canada to it we can easily identify the page/post belongs to what coutnry.

I hope that makes sense and you can add custom taxonomy that will help you to identify to what coutnry your post/page belongs.

#2792076

I created a different taxonomy for Mexico to separate it from Canada's operation. What I mean by that, is I don't want people to see cities from Mexico in the search function on the page related to Canada.

I want to copy one of the current views and assign the properties in Mexico's cities for this specific view like my current structure without changing the entire structure.

Basically, I created a post type for properties in Mexico assigned with "cities in Mexico" the same as the current setup. This post type is assigned with custom fields that I created for Mexican properties. I want to have a different "view" for it but I can't copy one of the views that I have.

If I try to change entire structure, I am concerned about breaking the current website which is working now. And I used to see "views" in the Divi theme and now pages on test mode look broken as I can't update it.

#2792214

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I created a different taxonomy for Mexico to separate it from Canada's operation. What I mean by that, is I don't want people to see cities from Mexico in the search function on the page related to Canada.
===>
Ok, for that we have a way to exclude desired terms from the taxonomy search filter using the hook.

I want to copy one of the current views and assign the properties in Mexico's cities for this specific view like my current structure without changing the entire structure.
==>
I think that is doable and you may have already done that.

Before taking any further step - I suggest you should take full backup of your website so in any worst situation you will have a backukp that you can restore. I hope that makes sence.

Now, please let me know where you are and where exactly you stuck. Please share all related URLs and admin access details(if its changed as you already shared before).

I have set the next reply to private which means only you and I have access to it.

#2792246

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thank you for sharing access details again. I hope you already made backup.

In addition to that - I'm not sure where exactly you stuck on what page/post? If you can guide me with the links where exactly you stuck and need help that will clarify the doubts and I will be able to guide you in the right direction.

Please share problem URLs where applicable.

I have set the next reply to private which means only you and I have access to it.

#2792444

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Pleaes check now: hidden link

You were displaying the "Coliving canada" view that was not right thing. I've followed almost the same step that I helped with before with the following ticket:
=> https://toolset.com/forums/topic/filtering-views-for-specific-pages/#post-2749852

On the following page:
- hidden link

I've added the view block at top of the above page click on "Use existing View" I've selected the view "Coliving list Canada" and click on "Use View" button and then further clicked on the button "Edit Copy" and to this copy view I've name the view "Coliving-list-Canada-copy-for-maxico" and save and from the content selection tab on rightside of this view I've removed the "Query Filter" for taxonomy "Cities in canada". You can add the query filter for your desired taxonomy.

When I check on the frontend - I can see the post you mentioned:
- hidden link

#2792624

Hi Minesh,

Actually, your solution to exclude the specific terms seems like an easier solution. I would like to use the solution that you referred below.

"Ok, for that we have a way to exclude desired terms from the taxonomy search filter using the hook."

Is this something that I can do with a hardcode below or there is functionality in Toolset to exclude specific terms? I checked the filter part but it doesn't give me much flexibility.

function exclude_guadalajara_from_search( $args, $view_id ) {
// Check if we're on the 'student-housing-canada' or 'co-living-canada' page
if ( is_page( array( 'student-housing-canada', 'co-living-canada' ) ) ) {
$args['tax_query'][] = array(
'taxonomy' => 'city in Canada',
'field' => 'slug',
'terms' => array( 'guadalajara' ),
'operator' => 'NOT IN',
);
}
return $args;
}
add_filter( 'toolset_taxonomy_search_filter', 'exclude_guadalajara_from_search', 10, 2 );

If there is something that I need to do through Toolset, I would appreciate your detailed explanation regarding where I can access that part. Thanks a lot for everything.

#2792640

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - I see you have created the taxonomy "Cities in Maxico":
- hidden link

So, to add the taxonomy filter you will have to add the taxonomy filter for the taxonomy "Cities in Maxico", as you can see now, I've added the taxoomy filter for the taxonomy "Cities in Maxico" to the top view "Coliving-list-Canada-copy-for-maxico" on the following page:
- hidden link

You can see the taxonomy dropdwon filter on frontend:
- hidden link

As you can see there is no post assigned to the term "guadalajara" - once you assigned post to the term you will be able to see it with the "Cities in Maxico" taxonomy dropdown filter.
- hidden link

I would say this is not at Toolset issue and I strongly recomond to go through the courses we offer and learn and check how you can build custom search and other features:
- https://toolset.com/course/

I'm afraid to say that we can not build sites for you doing support work. If you have such requirement I suggest you can get in touch with our certified parteners as the support we already provide is beyond the scope of our support policy.
- https://toolset.com/contractors/