Skip Navigation

[Resolved] Toolset Views and MapPress

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.

This topic contains 21 replies, has 4 voices.

Last updated by bennieT 5 years, 12 months ago.

Assigned support staff: Adriano.

Author
Posts
#104897

Hello,

My answer refers to a previous thread who was marked as "resolved".
Link to the previous thread explaining my problem :
https://toolset.com/forums/topic/filter-list-agencies-and-generate-a-list-of-points-on-google-maps/

My new remarks on your last post :
This is working but, it's not working when the map is set as "Mashup" in order to agregate all the points in a single map . The problem is the same as MapPress.
I found in the support forum of the plugin a thread that propose a solution based on a shortcode to put in the function.php. This code has been made by the author and the Toolset team. I integrated this peace of code in my function file but it doesn't work for me. It seems that it is incomplete. Can you help me to correct this ? I think it will do perfectly the job in my case.

Link to the forum thread : (the piece of code is in the last post)
hidden link

Thanks.

#105315

Dear Stephane,

After adding the code to functions.php in your theme, you need to replace your shortcode with:

[wpv-post-mashup width="98%" height="300" adaptive="true"]

What do you get when you put this shortcode? do you see the map at all?

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.

Regards,
Caridad

#105324

Hi CaridadZ,

Yes I see a map. But it displays the point of the active post and not the points of the result list filtered by the taxonomies. The "Views" is inserted by a shortcode in a single-agengy.php page designed to display the detail of an agency. The filters and the map are a sort of search engine to refine the list of the whole agencies. Do you have an other idea ?

#105381

Dear Stephane,

I'm Adriano and I will handle this issue now. I’ll send you a private email right now asking you for some private information that will help me debug this issue for you. Please check your email in a couple of minutes, and if you don’t get it, let me know so I can send it again.
Thanks.

#105412

Dear Stephane,

In your shortcode, try adding some debugging information to find out more information:

add_shortcode('wpv-post-mashup', 'views_mashup');
function views_mashup($atts) {
  global $WP_Views, $mappress;
var_dump($WP_Views->post_query->query_vars);
  $atts['query'] = $WP_Views->post_query->query_vars;
  return $mappress->shortcode_mashup($atts);
}

Regards,
Caridad

#105418
screen1.png

The result is "NULL". See screen capture above the map.

#106648

Dear Stephane,

Please let me see the code that you are using in the funcions.php and the shortcode call.

#106679

Adriano,

You have full access to the whole files (through FTP access) and I have set for you an admin account for the site. I sent you an email Friday.

Regards

#106681

I use the code found in mapress forum, updated by Caridadz in this thread.

In the function.php :

add_shortcode('wpv-post-mashup', 'views_mashup');
function views_mashup($atts) {
global $WP_Views, $mappress;
var_dump($WP_Views->post_query->query_vars);
$atts['query'] = $WP_Views->post_query->query_vars;
return $mappress->shortcode_mashup($atts);
}

In my template :

echo do_shortcode('[wpv-post-mashup width="98%" height="300" adaptive="true"]');
echo do_shortcode('[wpv-view id="4181"]');

#107084

Dear Stephane,

Yes, I have the credentials and I will check it. Back soon.

#107684

Dear Stephane,

I think that I found the solution, but I need a administrator access to write files (functions.php). Can you change my profile type?

#107693

Dear Adriano,

I provided you an admin account for the site and the access by FTP to all files.
You can therefore modify the function.php

Sincerely,

#107758

Dear Stephane,

Please try to put the map's shortcode inside of the View and let me know the feedback.

#107762

Adriano,

I had tried this solution, without succes. But now it's working. Have you modified the code in the function.php ?
You can view the result on the dev site.

Sincerely.

#107787

Dear Stephane,

Great good to see, I don't did anything so. Now you should remove the var_dump line. Is there any other question that I might help you?