0

how can i add and use the twitter bootstrap to my wp-admin backend by a plugin installation approach?

i plan to create multiple custom plugins and i just want to add bootstrap as a global style instead of using it per plugin

this is my code, it doesnt seem to work.

<?php

/*
 * Plugin Name: bootstrap
 * Plugin URI: http://#/
 * Description: add boostrap
 * Author: some guy
 * Author URI: http://#/
 * Version: 0.1.0
 */


function theme_name_scripts() {
    wp_enqueue_style( 'style-name', get_stylesheet_uri() . '/custom/css/bootstrap.css');
}

add_action( 'wp_enqueue_scripts', 'theme_name_scripts' );

?>
2

For use in the admin, you need the admin_enqueue_scripts hook instead of wp_enqueue_scripts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.