Support for Genesis 1280

This topic contains 7 replies, has 3 voices, and was last updated by  Kiran 7 years, 1 month ago.

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

Open Support Ticket
  • Author
    Posts
  • #405221

    Julian Screawn
    Expired Member
    Post count: 20

    I recently purchased the Genesis theme and I have the following issue:

    
    
    //* Add search bar
    add_action( 'genesis_after_header', 'geo1280_search_bar', 20 );
    
    function geo1280_search_bar() {
    	
    	if ( is_active_sidebar( 'search-bar' ) ) {
    		genesis_widget_area( 'search-bar', array(
    			'before' => '<div class="search-bar widget-area"><div class="wrap">',
    			'after' => '</div></div>',
    		) );
    	} else {
    		echo '<div class="geo1280-placeholder"></div>';
    	}
    }

    If I alter any of the code inside this widget area add function the changes are not reflected. I can remove everything from inside the function declaration and I will still get a working widget area. However if I remove the whole function I will lose the widget area. Is this function somehow being overridden by the plugin ?

    Thanks, Julian

    #405224

    Alex Rollin
    Moderator
    Post count: 27815

    Hello!

    Please create a private reply with your site URL and admin credentials in case we need to look at the site.

    How are you adding this, with a Snippet plugin or a child theme?

    #405232

    Julian Screawn
    Expired Member
    Post count: 20
    This reply has been marked as private.
    #405299

    Kiran
    Moderator
    Post count: 7069

    Hi Julian,

    The current function geo1280_search_bar from child theme is overridden by the GeoDirectory plugin. The GeoDirectory plugin overrides this search bar area when you are using Genesis + GeoDirectory + Geo 1280 Theme.

    See the code here https://github.com/GeoDirectory/geodirectory/blob/master/geodirectory-functions/compatibility/Genesis.php#L331

    Let me know what you want to achieve, so we can assist you.

    Thanks,
    Kiran

    #405355

    Julian Screawn
    Expired Member
    Post count: 20

    Hi Kiran, I would like to have control over the Search bar widget before and after entries, essentially I would like to replace the class with my own bootsrap classes.

    example:

    
    
    function geo1280_search_bar() {
    	
    	if ( is_active_sidebar( 'search-bar' ) ) {
    		genesis_widget_area( 'search-bar', array(
    			'before' => '<div class="row"><div class="col-sm-6">',
    			'after' => '</div></div>',
    		) );
    	} else {
    		echo '<div class="geo1280-placeholder"></div>';
    	}
    }

    Thanks, Julian

    #405359

    Kiran
    Moderator
    Post count: 7069

    Hi Julian,

    Please try this hook to add content before or after widget area. http://genesisdictionary.com/before-widget-area/

    Let us know how it goes.

    Thanks,
    Kiran

    #405362

    Julian Screawn
    Expired Member
    Post count: 20

    Hi Kiran, that hook is usefull, however, I would like to have the map area only full width, and the before_widget_area hook, places me inside the wrap area (see Hook result below), which has a max width of 1280px. I would like to hook in just before search-bar-widget area so the area is not bounded by the wrap (see Hook here below). The genesis after header hook actually places me below the search-bar widget.

    <div class="geo1280-placeholder"></div>												<div style="padding-top:50px;">Hook here.</div>												<div class="search-bar widget-area">												<div class="wrap"><div class="container-fluid">												<div class="row"><div class="col-sm-9">Hook Result</div></div></div>        												<div id="catcher_geodir_map_v3_home_map_4"></div>

    Thanks, Julian

    #405443

    Kiran
    Moderator
    Post count: 7069

    Hi Julian,

    Add following code snippet in your child theme functions.php file.

    
    
    function _gd_custom_remove_genesis_geo_1280_hook() {
        remove_action( 'genesis_after_header', 'geo1280_search_bar_fix', 4 );
        add_action( 'genesis_after_header', 'geo1280_search_bar', 4 ); // Adjust ordering of filter
    }
    add_action( 'after_setup_theme', '_gd_custom_remove_genesis_geo_1280_hook', 12 );

    Now you can adjust “before” and “after” elements in geo1280_search_bar() function in same functions.php file.

    Thanks,
    Kiran

Viewing 8 posts - 1 through 8 (of 8 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