Skip to content

Instantly share code, notes, and snippets.

@tahirtaous
Created January 8, 2015 20:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tahirtaous/9fd3a822080d11c6cb47 to your computer and use it in GitHub Desktop.
Save tahirtaous/9fd3a822080d11c6cb47 to your computer and use it in GitHub Desktop.
Create WordPress widget with Bootstrap Jumbotron styling
// Add this to your wordpress themes functions.php to register widget with bootstrap's jumbotron styling
register_sidebar( array(
'name' => __( 'Featured below navigation', 'twentytwelve' ),
'id' => 'sidebar-featured',
'before_widget' => '<div class="jumbotron"><aside id="%1$s" class="container %2$s">',
'after_widget' => '</aside></div>',
'before_title' => '<h1>',
'after_title' => '</h1> <div class="lead">',
) );
// add folling code where you want your widget to apperaed e.g header.php
<?php dynamic_sidebar( 'sidebar-featured' ); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment