jeudi 28 janvier 2016

Bootstrap and css don't be recognized in my plugin

I am trying to make my own plugin on Wordpress and bootstrap and css don't work, there isn't connection between them. Here is my code, if you have any ideas about that I will be very thankful.

 unction my_options_style() {
            wp_register_style('my_options_css', plugin_dir_url(__FILE__) . 'css/style.css', false, '1.0.0');
      wp_register_style('bootstrap_options_css', plugin_dir_url(__FILE__) . 'includes/bootstrap-3.3.6-dist/css/bootstrap.min.css', false, '1.0.0');
      wp_register_style('bootstrap_css', plugin_dir_url(__FILE__) . 'includes/bootstrap-3.3.6-dist/css/bootstrap-theme.min.css', false, '1.0.0');
            wp_enqueue_style('my_options_css');
      wp_enqueue_style('bootstrap_options_css');
      wp_enqueue_style('bootstrap_css');
     }
     add_action('admin_enqueue_scripts', 'my_options_style');


     function theme_scripts() {
      wp_enqueue_script( 'my-ads', plugin_dir_url(__FILE__) . 'includes/bootstrap-3.3.6-dist/js/bootstrap.min.js', array(), '1.0.1', true );
     }
     add_action( 'wp_enqueue_scripts', 'theme_scripts' );



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire