This topic has 14 replies, 4 voices, and was last updated 8 years by rikbutterflyskull.
-
Author
-
August 13, 2015 at 03:46 #72795ParkproductionsParticipant
Hi wanted to make the map on my listing page fullwidth like on the homepage. Set width to 100% in the widget settings however the container in the template gd uses by default is only 1280px wide for that page.
Need to know what page template gd is grabbing and if its possible to make adjustments similar to the header shortcode [gd_homepage_map width=100% height=600px maptype=roadmap zoom=1 autozoom=true child_collapse=true scrollwheel=false marker_cluster=1 ]
on this page http://www.globalsportcoach.com/places/tennis-2/
to make it look like this page http://www.globalsportcoach.com/facilities/
August 13, 2015 at 16:06 #72863sharmstrModeratorRemove the map widget from GD Listing Top Section and add this to your child’s functions.php file.
COPY CODEadd_action('kleo_before_content','add_map'); function add_map() { if (is_post_type_archive() && in_array(get_post_type(), geodir_get_posttypes())) { echo do_shortcode('[gd_homepage_map width=100% height=600px maptype=roadmap zoom=1 autozoom=true child_collapse=true scrollwheel=false marker_cluster=1]'); } }
Be sure to test all pages. It was a bear trying to figure out how to only add it to the listing page. I dont see that they have a basic function like “if_page(‘listing’)”.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
August 14, 2015 at 05:13 #72942ParkproductionsParticipantThanks Sharmstr your a legend! I’m having some unrelated permalink issues though, it shows no results on the listing pages but all the layout and styling is perfect, cheers.
August 14, 2015 at 16:28 #72984sharmstrModeratorawesome!
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
August 18, 2015 at 06:08 #73516ParkproductionsParticipantHey Sharmstr, I’ve updated to geodirectory 1.5.1 as they made a fix to the permalinks issue however I can’t get the function code snippet you provided to trigger the map properly. It currently is still trying to display inside a non-full-width page template.
issue on this page http://www.globalsportcoach.com/places/
August 18, 2015 at 14:49 #73545sharmstrModeratorThe code still works for me with the latest geo update. Did you purge your server cache after the updae. You site is throwing a bunch of 404 errors.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
August 21, 2015 at 04:09 #74012ParkproductionsParticipantHi Sharmstr, I’ve got the code snippet to work on a clean install of kleo and wordpress however my live site still isn’t displaying correctly. Screenshots of css elements attached hoping I’ve just missed something basic
August 21, 2015 at 04:12 #74013ParkproductionsParticipantCSS Image
Attachments:
You must be logged in to view attached files.August 21, 2015 at 06:51 #74017ParkproductionsParticipantResolved the issue, there was a difference in my kleo/page-parts/general-before-wrap.php file
September 1, 2015 at 16:08 #75675msattoloParticipantHi Sharmstr and Parkproductions
I am trying to perform the same but the map it is not showing. I understand you had to change some code in the general-before-wrap.php file. Could you point me where, to see if I can solve it?
Thank you!
MiriamSeptember 1, 2015 at 17:00 #75691sharmstrModeratorHi Miriam,
Please read the thread again. His issue was that he had a custom general-before-wrap.php, not that he put my code in there. Look at my first response. That’s what you need to do.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
September 8, 2015 at 03:51 #76519ParkproductionsParticipantHey Sharmstr, is there a way to use the code provided to also full width the map div on a search result page
That link is currently using the GD Search Top Section > GMAP Homepage widget
September 8, 2015 at 17:05 #76598sharmstrModeratorNot sure. Guess you could try adding geodir_is_page(‘search’) to the original function I gave you.
COPY CODEadd_action('kleo_before_content','add_map'); function add_map() { if (geodir_is_page('search') || is_post_type_archive() && in_array(get_post_type(), geodir_get_posttypes())) { echo do_shortcode('[gd_homepage_map width=100% height=600px maptype=roadmap zoom=1 autozoom=true child_collapse=true scrollwheel=false marker_cluster=1]'); } }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
January 27, 2016 at 05:45 #100701rikbutterflyskullParticipantHi, i had the same problem today. Solved by the first function
COPY CODEadd_action('kleo_before_content','add_map'); function add_map() { if (is_post_type_archive() && in_array(get_post_type(), geodir_get_posttypes())) { echo do_shortcode('[gd_listing_map width=100% height=350 scrollwheel=false]'); } }
replacing the shortcode [gd_homepage_map] only for homepage with [gd_listing_map] for listing page, in according with Geodirectory shortcodes
-
AuthorPosts
The forum ‘Plugins questions’ is closed to new topics and replies.