Prevent a base themes css file from loading

You can use wp_deregister_style in your child theme. Like this. function remove_unwanted_css() { wp_dequeue_style( ‘bootstrap’ ); wp_deregister_style( ‘bootstrap’ ); wp_dequeue_style( ‘bootstrap-custom’ ); wp_deregister_style( ‘bootstrap-custom’ ); } add_action( ‘wp_enqueue_scripts’, ‘remove_unwanted_css’, 20 ); Similarly you can deregister other unwanted css too. Just add wp_deregister_style in this function.

How to install bootstrap in child theme

get_template_directory_uri always returns the parent theme’s URI. From the docs: In the event a child theme is being used, the parent theme directory URI will be returned You probably want get_stylesheet_directory_uri. add_action(‘wp_enqueue_scripts’, ‘wpse174502_styles’, PHP_INT_MAX); function wpse174502_styles() { wp_enqueue_script(‘bootstrap-js’, get_stylesheet_directory_uri().’/bootstrap/js/bootstrap.min.js’, array(‘jquery’), NULL, true); wp_enqueue_style(‘bootstrap-css’, get_stylesheet_directory_uri().’/bootstrap/css/bootstrap.min.css’, false, NULL, ‘all’); } Whenever you’re debugging enqueues be sure to… … Read more

Custom Theme Bootstrap

If you have a LESS version of Bootstrap (non-compiled) you need to change the @grid-float-breakpoint variable to 992px to get the navbar to collapse on “Tablet” (Medium) breakpoint. Source: Changing the collapsed mobile navbar breakpoint The navbar collapses into its vertical mobile view when the viewport is narrower than @grid-float-breakpoint, and expands into its horizontal … Read more

NavWalker Bootstrap Error (won’t dropdown)

Wrong container_id and menu_class. See WP Bootstrap NavWalker Usage section. <?php wp_nav_menu( array( ‘theme_location’ => ‘primary’, ‘depth’ => 2, ‘container’ => ‘div’, ‘container_class’ => ‘collapse navbar-collapse’, ‘container_id’ => ‘bs-example-navbar-collapse-1’, ‘menu_class’ => ‘nav navbar-nav’, ‘fallback_cb’ => ‘WP_Bootstrap_Navwalker::fallback’, ‘walker’ => new WP_Bootstrap_Navwalker(), ) );

Make menu bootstrap compatible

You can try this way: <nav class=”navbar navbar-default” role=”navigation”> <div class=”container”> <div class=”navbar-header”> <button type=”button” class=”navbar-toggle collapsed” data-toggle=”collapse” data-target=”#navbar” aria-expanded=”false” aria-controls=”navbar”> <span class=”sr-only”>Toggle navigation</span> <span class=”icon-bar top-bar”></span> <span class=”icon-bar middle-bar”></span> <span class=”icon-bar bottom-bar”></span> </button> <a class=”navbar-brand” href=”https://wordpress.stackexchange.com/questions/313884/<?php coldstar_the_page_link(“front-page.php’ ); ?>”> <img src=”<?php bloginfo(‘template_url’); ?>/images/companylogo.png” class=”img-responsive hidden-md” alt=”Bed Centre Grimsby Logo”> <img src=”<?php bloginfo(‘template_url’); ?>/images/logo.png” class=”img-responsive … Read more

WordPress \ Bootstrap 4 not building breadcrumbs correctly

the_title() echoes the title, by default. Use get_the_title() instead. function get_breadcrumb() { echo ‘<nav aria-label=”breadcrumb”>’; echo ‘<ol class=”breadcrumb”>’; if(!is_home() && !is_front_page()) { echo ‘<li class=”breadcrumb-item”><a href=”‘.home_url().'” rel=”nofollow”>Home</a></li>’; if (is_page()) { echo ‘<li class=”breadcrumb-item active” aria-current=”page”>”‘.get_the_title().'”</li>’; } } echo ‘</ol>’; echo ‘</nav>’; }

custom shortcode will not display the wrapped content

Because the shortcode must return a string. Avoid using the “echo” function in shortcode. Instead of doing that: function my_shortcode_function($content){ echo ‘<div class=”wrap”>’; echo ‘<div class=”col”>’.$content.'</div>’; echo ‘</div>’; } Do that: function my_shortcode_function($content){ $shortcode_return = ‘<div class=”wrap”>’; $shortcode_return .= ‘<div class=”col”>’.$content.'</div>’; $shortcode_return .= ‘</div>’; return $shortcode_return; } Or use object buffering: function my_shortcode_function($content){ ob_start(); ?> … Read more

How can I remove data-target=”#” from bootstrap dropdown menu?

Your options are the following: Extend the walker and change the output (override start_el function) Here is an example of the Walker, assuming you are using this bootstrap walker. Usage: ‘walker’ => new se150102_bootstrap_walker() Walker: class se150102_bootstrap_walker extends wp_bootstrap_navwalker { /** * This walker is identical to the parent start_el() function, except * it does … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)