Map width not working

This topic contains 4 replies, has 2 voices, and was last updated by  Paolo 10 years, 2 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #26542

    Robert Strobel
    Expired Member
    Post count: 54

    Hey,

    We’re trying to use the map widget on our custom homepage. We do NOT want to use the GeoDir homepage.. we have our own needs and want to use a wordpress page. We installed a plugin to enable us to use widgets as shortcodes ([widget id=”id of the widget”])

    I added the Homepage Map widget to this page using the shortcode mentioned above. I changed the widget width setting to 100%.. tried 1000px too… it keeps staying at 960px?

    I added a css rule using the div ids I can see.. set width to 100%… this changes the wrapper but the map itself keeps staying at 960px…

    This is urgent.. please help.. time here is being wasted

    #26546

    Robert Strobel
    Expired Member
    Post count: 54
    This reply has been marked as private.
    #26560

    Paolo
    Site Admin
    Post count: 31211

    Hi,

    the problem is that the shortcode plugin isn’t able to pass the width variable to the function creating the map, like the widget did.

    Why don’t you add a custom widget area to your custom home page instead, that way you can use the widget as it is supposed to be used?

    add this to your theme functions.php

    
    
    if ( function_exists('register_sidebar') )
        register_sidebar( array(
       'name' => __( 'My Custom Widget Area - 1'),
       'id' => 'mycustomwidgetarea',
       'description' => __( 'An optional widget area for your home map', 'yourthemename' ),
       'before_widget' => '<div id="%1$s" class="widget %2$s">',
       'after_widget' => "</div>",
       'before_title' => '',
       'after_title' => '',
       ) );

    and this in your home page template.

    
    
    <?php 
     // Custom widget Area Start
     if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('My Custom Widget Area - 1') ) : ?>
    <?php endif;
    // Custom widget Area End
    ?>

    It will create a widget area where you can use the widget as it is supposed to be used.

    Let us know,

    #26570

    Robert Strobel
    Expired Member
    Post count: 54

    It’s not a template. It’s the same template as other pages. We want content above and below it so adding a is_front_page() condition would not work either

    #26576

    Paolo
    Site Admin
    Post count: 31211

    What you wish to do, currently cannot be done.

    We have an addon with shortcodes for all widgets almost finished, but it hasn’t been tested enough to release it.

    We’ll try to get into it and release it asap.

    Thanks

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount