css

WordPress – Show the thumbnail and the title of a WP post with Bootstrap media

Add the following code to your theme’s functions.php file: /* * Show the thumbnail and the title of a WP post with bootstrap media */ // Add the shortcode add_shortcode(‘show_post_wp_bm’, ‘get_post_title_and_thumbnail_in_boostrap_media’); // Create the function if(!function_exists(‘get_post_title_and_thumbnail_in_boostrap_media’)): function get_post_title_and_thumbnail_in_boostrap_media($atts, $content=null) {…

Read MoreWordPress – Show the thumbnail and the title of a WP post with Bootstrap media

WordPress – Adding Bootstrap to wp_list_categories()

Add the following code to your theme’s functions.php file: // Categories walker class Walker_Categories_Template extends Walker_Category { function start_lvl(&$output, $depth=1, $args=array()) { $output .= “\n<ul class=\”list-group\”>\n”; } function end_lvl(&$output, $depth=0, $args=array()) { $output .= “</ul>\n”; } function start_el(&$output, $item, $depth=0,…

Read MoreWordPress – Adding Bootstrap to wp_list_categories()

Bootstrap navbar – disable collapse

Use the following code to disable the navbar collapse in Twitter’s Bootstrap version 3.3.4: /*no collapse*/ .navbar-collapse.collapse.off { display: block!important; } .navbar-collapse.collapse.off ul { margin: 0; padding: 0; } .navbar-nav.no-collapse>li, .navbar-nav.no-collapse { float: left !important; } .navbar-right.no-collapse { float: right!important;…

Read MoreBootstrap navbar – disable collapse