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 TicketTagged: Genesis Theme 1280, snippet
-
AuthorPosts
-
November 14, 2017 at 3:11 pm #405221
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
November 14, 2017 at 3:16 pm #405224Hello!
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?
November 14, 2017 at 5:04 pm #405232This reply has been marked as private.November 15, 2017 at 6:17 am #405299Hi 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,
KiranNovember 15, 2017 at 12:50 pm #405355Hi 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
November 15, 2017 at 1:38 pm #405359Hi 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,
KiranNovember 15, 2017 at 2:20 pm #405362Hi 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
November 16, 2017 at 4:23 am #405443Hi 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 -
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket