Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.