Map width

This topic contains 14 replies, has 3 voices, and was last updated by  thehouseofdoguk 9 years, 6 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #16499

    thehouseofdoguk
    Free User
    Post count: 200

    Hi

    Is there a way to make the top map display only as wide as the bunch of boxes showing ‘All dog friendly attractions’ in the main section of the page at the link I’ll send next in a private message?

    I hope that sentence makes some kind of sense to someone! I’m not sure it does me!

    I just want the widgets on the right hand side to move up and the map not be so ‘in your face’

    Thanks

    #16500

    thehouseofdoguk
    Free User
    Post count: 200
    This reply has been marked as private.
    #16502

    Simone
    Expired Member
    Post count: 3515

    Hello, you can place the “GD > GMap Home Page” widget from “GD Home Top Section” to “GD Home Content Tection”

    #16509

    thehouseofdoguk
    Free User
    Post count: 200
    This reply has been marked as private.
    #16511

    Simone
    Expired Member
    Post count: 3515

    In the Listing page, you can place the map only on top, left/right or bottom, not in the content section

    #16512

    thehouseofdoguk
    Free User
    Post count: 200

    Ah ok, so changing the width to a certain size somehow won’t change this to look the same if I leave it in the top section?

    I really like the look of the page you helped me change, but the others just look a bit clumsy and huge 🙁

    Is there anything I can do with css if all else fails?

    #16517

    Simone
    Expired Member
    Post count: 3515

    I’m good today, I’ve just made a function to do that, copy the following in the functions.php file, within your child theme

    
    
    add_action( 'geodir_main_content_open', 'geodir_listings_map_before', 10 );
    				function geodir_listings_map_before() {
    									
    									the_widget( 'geodir_map_listingpage', 'width=100%' );
    									
    									}

    🙂

    #16520

    czar
    Buyer
    Post count: 316

    Hi Simone, this interested me also. Tried but it does not load map

    #16523

    czar
    Buyer
    Post count: 316
    This reply has been marked as private.
    #16532

    Simone
    Expired Member
    Post count: 3515

    Ok, disregard the first code, add this in functions.php in your child theme

    
    
    function listing_content_init() {
    
    	register_sidebar( array(
    		'name' => 'GD Listing Content Section ',
    		'id' => 'listing_content',
    		'before_widget' => '<div>',
    		'after_widget' => '</div>',
    		'before_title' => '<h2">',
    		'after_title' => '</h2>',
    	) );
    }
    add_action( 'widgets_init', 'listing_content_init' );
    
    			 
    			
    			add_action( 'geodir_main_content_open', 'geodir_listings_map_before', 10 );
    				function geodir_listings_map_before() { ?>
    							<?php if ( is_active_sidebar( 'listing_content' ) ) : ?>
    								<div>
    									<?php dynamic_sidebar( 'listing_content' ); ?>
    								</div>
    								<?php endif;  	} 

    and *ta-dah* you will find a new widget area called “GD Listing Content Section”, you can place the widget(s) there.
    Enjoy

    #16566

    czar
    Buyer
    Post count: 316

    Mmm… something is wrong. This function generates incorrect link with share-location and obviously does not load map (in homepage)

    #16567

    czar
    Buyer
    Post count: 316
    This reply has been marked as private.
    #16569

    czar
    Buyer
    Post count: 316

    solved. must be removed from the code, the last

    ?>

    thanks Simone

    ps: question… you may have with the same way, widget area, in listing-detail?

    #16580

    Simone
    Expired Member
    Post count: 3515

    Yes I copy pasted the last part of my functions.php, the last tag needs to be removed, I’m going to edit the code I posted up

    #16638

    thehouseofdoguk
    Free User
    Post count: 200

    Thanks 🙂

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

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

Open Support Ticket