Geodirectory with U-design theme 960 grid

This topic contains 23 replies, has 5 voices, and was last updated by  John Allsopp 9 years, 4 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #23010

    amstourist
    Expired Member
    Post count: 185

    Hello from Amsterdam!

    I just downloaded and installed the basic plugin and I’m planning to go for the full package with all the add-on’s, but…

    I’m using the U-design theme based on a 960 grid. The output is not something I like at this moment: http://www.amsterdamtourist.info/location/

    I would like to have a full width map with the listing and everything else within the 960 grid container. How can I do this?

    Cheers, Jan

    #23013

    Guust
    Moderator
    Post count: 29970

    Hi Jan
    Add this to your style.css:

    #geodir-wrapper {
    width: 960px;
    margin: auto;
    }

    and then go to Appearance > widgets > GD Home Top Section > GD-Gmap – home page > set the map to 100%

    Let us know how that went.

    #23023

    amstourist
    Expired Member
    Post count: 185

    Hi Guust!

    Many THX for the reply.
    It worked except for one thing. The map is now also within the 960 grid container and I prefer the map full width…

    I adjusted the map widget into 100% Map Width, but that didn’t work…

    Cheers, Jan

    #23030

    Guust
    Moderator
    Post count: 29970

    I’ll notify the others, they might have a better idea.

    #23032

    amstourist
    Expired Member
    Post count: 185

    Thx Guust!

    #23033

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    the theme wrapper is 960px wide and the map is inside of it.

    Using that theme, there is no way to make it go wider than that.

    You’ll need to change theme or heavily modify the one you are using to make the map full width.

    Thanks

    #23084

    amstourist
    Expired Member
    Post count: 185

    Hi Paolo,

    The U-design theme is very flexible. I can set the 960 grid to a full width or any other dimension grid…. But I don’t want to do that for all the text content pages and pictures I have to change….

    I only want a full width map for the GD Homepage “location” (and any other category listing page with a map on top), just like the slider on my homepage >> the slider is full width and text within a responsive container (class “container_24”) http://www.amsterdamtourist.info

    I deleted the css code Guust advised me…

    #geodir-wrapper {
    width: 960px;
    margin: auto;
    }

    … and changed into another css code:

    .geodir_full_page section.widget {
    width: 960px;
    margin: auto;
    }

    You can see that the map is now full width:http://www.amsterdamtourist.info/location/

    This worked only for the top elements;
    – map
    – popular categories
    – search bar

    The rest, GD Home Section & GD Right Section, is still full width.

    I think it should be possible but how? I’m not a genius in coding 😉
    Hope you can help me…..

    Cheers, Jan

    #23109

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    to allow the map to be full width while the rest of the page is contained within the 960px grid you have to remove the top section page (geodir_full_page) from within the maing gd wrapper (geodir-wrapper) and add it back outside and on top of it.

    See images attached.

    You can do that quite simply by doing the following:

    1) move a copy of the template geodirectory/geodirectory-templates/geodir-home.php within a folder named geodirectory that you create inside your active theme or child theme.

    2) Open the file and swap position of the 1st 2 code chunks:

    From:

    
    
    <?php 
    // get header
    get_header(); 
    
    ###### WRAPPER OPEN ######
    // this adds the opening html tags to the primary div, this required the closing tag below :: ($type='',$id='',$class='')
    do_action( 'geodir_wrapper_open', 'home-page', 'geodir-wrapper','');
    
        ###### TOP CONTENT ######
    	// action called before the main content and the page specific content
    	do_action('geodir_top_content', 'home-page');
    	// template specific, this can add the sidebar top section and breadcrums
    	do_action('geodir_home_before_main_content');
    	// action called before the main content
    	do_action('geodir_before_main_content', 'home-page');

    to:

    
    
    <?php 
    // get header
    get_header(); 
    
        ###### TOP CONTENT ######
    	// action called before the main content and the page specific content
    	do_action('geodir_top_content', 'home-page');
    	// template specific, this can add the sidebar top section and breadcrums
    	do_action('geodir_home_before_main_content');
    	// action called before the main content
    	do_action('geodir_before_main_content', 'home-page');
    
    ###### WRAPPER OPEN ######
    // this adds the opening html tags to the primary div, this required the closing tag below :: ($type='',$id='',$class='')
    do_action( 'geodir_wrapper_open', 'home-page', 'geodir-wrapper','');
    

    Than in your custom css add:

    
    
    #geodir-wrapper {
        margin: 0 auto;
        max-width: 960px;
    }

    Form more advanced templating options you can see this tutorial: http://docs.wpgeodirectory.com/how-to-build-your-own-theme-compatibility-plugin/

    Let us know,

    Thx

    #23121

    amstourist
    Expired Member
    Post count: 185

    Hi Paolo,

    I checked everything, step-by-step, but it didn’t work.
    The map is within the container and not full width…

    Do you have any other idea or suggestion?

    Cheers, Jan

    #23125

    Guust
    Moderator
    Post count: 29970

    Jan, please post your WP admin details (username and password) in a private message so Paolo can have a look for you.

    #23126

    Paolo
    Site Admin
    Post count: 31206

    yes, and possibly FTP details.
    thx

    #23133

    amstourist
    Expired Member
    Post count: 185
    This reply has been marked as private.
    #23134

    amstourist
    Expired Member
    Post count: 185
    This reply has been marked as private.
    #23190

    Paolo
    Site Admin
    Post count: 31206

    Hi Jan,

    the geodir-home.php template didn’t have effect, because you are not using the plugin as home.

    In that case, moving geodir-locaiton.php should have done it, but it doesn’t and I have to ask to Stiofan why…

    Given that your theme is very similar to Enfold and the alikes, with plenty of hooks and actions as well as GD, I wrote 3 quick functions in your child theme functions.php, to make GD adapt to the theme, like we do in our compatibility plugins.

    Example: https://wordpress.org/plugins/geodirectory-enfold-theme-compatibility-pack/

    This is what I did so far:

    
    
    
    // REMOVE HOME TOP SECTION
    	remove_action( 'geodir_home_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10 );
    
    // REMOVE ORIGINAL WRAPPER
    remove_action( 'geodir_wrapper_open', 'geodir_action_wrapper_open', 10 );
    	
    // ADD WRAPPER BACK WITH NEW FUNCTION
    add_action( 'geodir_wrapper_open', 'udesign_action_wrapper_open', 9 );
    
    // WRAPPER OPEN NEW FUNCTIONS WITH geodir_home_top BEFORE THE WRAPPER
    function udesign_action_wrapper_open(){
    	global $wp;
    		if ( $wp->query_vars['page_id'] == get_option( 'geodir_location_page' ) || is_home() && !$_GET['geodir_signup'] ) {
    			echo '<div class="udesign-loc-top">';
            	dynamic_sidebar('geodir_home_top');
    			echo '</div>';
    		echo "<div id='geodir-wrapper'>";
    }}
    
    

    This is the result, which isn’t ideal, but I think it will allow you to get in the right track.

    Now you should remove the original breadbrumb to remove the space between the title bar and the map and possibly use GD breadcrumb instead (regular breadcrumb won’t be able to display location anyway).

    My suggestion would be to check how a compatibility plugin is made (the one for enfold for example which is very similar to uDesign) and recreate the same level of compatibility with your theme.

    Should you need help doing that, John is available for hire to do this kind of integrations.

    Let us know,

    Thanks

    #23194

    Guust
    Moderator
    Post count: 29970

    This might help too, it is written by John, the theme wizard.
    http://docs.wpgeodirectory.com/how-to-build-your-own-theme-compatibility-plugin/

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

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

Open Support Ticket