Skip to content

Instantly share code, notes, and snippets.

@radarin
Last active November 13, 2018 04:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save radarin/53100fd5d50286c59f78b216efb4b2e7 to your computer and use it in GitHub Desktop.
Save radarin/53100fd5d50286c59f78b216efb4b2e7 to your computer and use it in GitHub Desktop.
Sidebar in Wordpress registrieren
if ( ! function_exists( 'lovecraft_sidebar_registration' ) ) {
/* Beispiel für das Theme 'Lovecraft' */
function lovecraft_sidebar_registration() {
register_sidebar( array(
'name' => __( 'Titel in den Einstellungen', 'lovecraft' ),
'id' => 'eindeutiger-name',
'description' => __( 'Beschreibung für den Einstellungsbereich.', 'lovecraft' ),
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
'before_widget' => '<div class="widget %2$s"><div class="widget-content-footer">',
'after_widget' => '</div><div class="clear"></div></div>'
) );
}
add_action( 'widgets_init', 'lovecraft_sidebar_registration' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment