Forum: Bug Reports

This forum is closed for new topics. However, you can still search for a solution in the old topics. For technical support and general questions related to GEO my WP plugin and its core add-ons please use the support forum.

[Resolved]Disable scroll zoom not working on results page

Home Forums Bug Reports Disable scroll zoom not working on results page

This topic contains 7 replies, has 4 voices, and was last updated by  wisebuilds 3 weeks, 5 days ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #49397

    Keith McGregor
    Participant

    Hi

    I have set up a custom results page and have split up the map and results. When I use the following shortcode, scroll wheel zoom is still enabled. Is there anything I can do to override it?
    <?php echo do_shortcode('[gmw map="1" scrollwheel_map_zoom="0"]'); ?>
    I’ve managed to disable it elsewhere on the site, but this one page is proving problematic.

    Thanks.

    #49406

    Eyal Fitoussi
    Keymaster

    HI Keith,
    There is no “scrollwheel_map_zoom” attribute available with GEO my WP.

    I’ve managed to disable it elsewhere on the site, but this one page is proving problematic.

    How did you manage to do that for other map?

    Which version of GEO my WP are you using?

    Are you using any paid add-ons or the free version only?

    I am only asking because there are not settings or shortcode attributes available in the free version that will disable the scroll zoom. It can only be done via filters.

    #49413

    Keith McGregor
    Participant

    It’s in your own documentation here. Point 12.

    http://docs.geomywp.com/single-location-shortcode/

    I have the global maps add-on.

    #49459

    Eyal Fitoussi
    Keymaster

    Ah, you’r right. I totally forgot about this shortcode. Sorry about that.

    However, this attribute is not available with the search forms shortcodes. That’s for the main reason that the search forms shortcodes do not use any attributes and everything is setup using the form builder.

    add the script below to the functions.php file of your theme and see if it works:

    #49691

    Eyal Fitoussi
    Keymaster

    This topic marked “Resolved” due to inactivity. If you wish to reply to this topic please change its status to “Not resolved”  before replying.

    #57744

    Lee Fuller
    Participant

    Hello Eyal,

    I’ve tried the above script – and it is not working for me. And I see this is an older topic, so maybe there is another solution already in place?

    #58883

    wisebuilds
    Participant

    Hi Lee,

    A little late, but since I found this topic, here is a working snippet for Geo my WP v 3.2.1:

    • This reply was modified 3 weeks, 5 days ago by  wisebuilds. Reason: code formatting
    • This reply was modified 3 weeks, 5 days ago by  wisebuilds. Reason: code formatting
    #58886

    wisebuilds
    Participant

    The code tag is not accepting single quotes so lets try it in a blockquote:

    function wbs_gmw_disable_scroll_zoom( $map_element ) {

    $map_element[‘map_options’][‘scrollwheel’] = false;

    return $map_element;
    }
    add_filter( ‘gmw_map_element_1’, ‘wbs_gmw_disable_scroll_zoom’, 50 );

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.