New answers tagged

1

Do you understand the bootstrap framework at all? Your theme has implemented a column width that is smaller than you would probably like. Your content area is wrapped in an offset column that is 50% of the container width. <div class="col-lg-6 col-lg-offset-3"> <!-- content --> </div> If you want to increase the width of your ...


0

This is how I bootstrapped youtube embeds in one of my projects. /** * Responsive Youtube embeds. */ add_filter( 'embed_oembed_html', function( $html, $url, $attr, $post_ID ) { if ( false !== stripos( $html, '<iframe ' ) && false !== stripos( $html, '.youtube.com/embed' ) ) { $html = sprintf('<div class="embed-responsive ...


0

The gallery shortcode is contained in the wp-includes/media.php file. There is a function gallery_shortcode( that does all work. About 25 lines down you find: $output = apply_filters( 'post_gallery', '', $attr, $instance ); if ( $output != '' ) { return $output; } This code goes out and runs any filters tethered to post_gallery, and ...


0

You will need to write a custom menu walker. See this code for the walker. (Or do a search for "Bootstrap Menu Walker".) Then use: wp_nav_menu( array( 'menu' => 'header', 'menu_class' => 'nav nav-pills', 'container' => 'nav', 'container_class' => $classes, 'fallback_cb' => false, 'depth' => 2, ...


1

There is no good way of doing this. One way is to enumerate the already registered scripts, like this: function yourplugin_add_my_stylesheet() { global $wp_styles; if ( $wp_styles instanceof WP_Styles ) { // enumerate all current styles foreach( $wp_styles->queue as $handle ) { // use the $handle to see if ...


0

Swopnil Dangol is correct, However seeing that you are editing a standard wordpress theme in the first place with bootstrap i would not bother the below answer is the for lazy man. php echo get_template_directory_uri(); ?> infront of the urls


0

If you want to link stylesheets and scripts in wordpress,the correct way is to use wp_enqueue_style() and wp_enqueue_scripts() in your functions.php file Try this in your functions.php file wp_enqueue_style('bootstrap-css',get_template_directory_uri().'/bootstrap/css/bootstrap.min.css'); ...


0

Your problem is not within your control. iframes are not your site (at least when embedding content from outside sources). The content there is under the control of some other developer. Then you have the problem that hiding and showing things using JavaScript can really mess things up – a common example is with Google Maps. The best you can do is to switch ...



Top 50 recent answers are included