Customizing default Mediaelement player

Okay so i did manage to add some custom css selectively on pages that load the medialement player by adding this to my functions.php file: function custom_player() { wp_enqueue_style( ‘custom-player’, get_stylesheet_directory_uri() . ‘/wp-mediaelement.css’ ); $custom_css = ” /*here goes the css*/ “; wp_add_inline_style( ‘custom-player’, $custom_css ); } add_action( ‘wp_enqueue_scripts’, ‘custom_player’ ); Like this by using … Read more

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

@font-face broken in child theme

The problem is not there in your @font-face it’s actually in the functions.php where you enqueued the stylesheets. What I assume your parent theme is enqueuing stylesheets like below: <link rel=”stylesheet” id=’bootstrap-css’ href=”http://example.com/wp-content/themes/parenttheme/bootstrap.min.css” type=”text/css” media=”all” /> <link rel=”stylesheet” id=’style-css’ href=”http://example.com/wp-content/themes/parenttheme/style.css” type=”text/css” media=”all” /> But what’s happening in your child theme: <link rel=”stylesheet” id=’parent-style-css’ href=”http://example.com/wp-content/themes/parenttheme/style.css” type=”text/css” … Read more

Removing non native customizer settings from a child theme

I am guessing a lot about how your themes work but, the child theme’s functions.php runs before the parent theme’s functions.php, so anything loaded by the parent’s functions isn’t going to be present for you to remove. You need to hook your function so that it runs later. add_action(‘after_setup_theme’, ‘remove_custom’); Though you would need to … Read more