-
-
Save DavidPeralvarez/dd79907e68c1fd2e9d895aeeecd09c56 to your computer and use it in GitHub Desktop.
Solución al reto: Áreas de Widgets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Child Theme customizations | |
*/ | |
// Create before entry widget area | |
genesis_register_sidebar( [ | |
'id' => 'before-entry', | |
'name' => esc_html__( 'Before Entry', 'genesis-sample' ), | |
'description' => esc_html__( 'Widget area placed before the entry.', 'genesis-sample' ) | |
] ); | |
add_action( 'genesis_before_entry', 'genesis_sample_widget_area_before_entry' ); | |
function genesis_sample_widget_area_before_entry(){ | |
if( is_single() ): | |
genesis_widget_area( 'before-entry', [ | |
'before' => '<div class="before-entry widget-area"><div class="wrap">', | |
'after' => '</div></div>' | |
] ); | |
endif; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Before Entry | |
--------------------------------------------- */ | |
.before-entry .enews-widget { | |
background-color: #333; | |
padding: 30px; | |
color: white; | |
} | |
.before-entry .enews-widget #subbutton{ | |
background-color: #0073e5; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment