Glyphicons Dont Show in WordPress Plugin Only
-
Hello
I have a very simple WordPress plugin that shows a menu/admin page. The page contains Glyphicons – Font Awesome.
These glyphicons are never showing. I cannot figure out why because I know the font-awesome css file is being loaded correctly and I know that the admin pages HTML works fine outside of a wordpress plugin and shows the Glyphs.
What could possibly be going wrong?
<?php /** * Plugin Name: TEST Use FA Icons * Plugin URI: * Description: Test Development Plugin * Version: 1.0.0 * Author: * Author URI: * License: GPL2 */ class TEST_Use_FA_Icons_Admin { public function __construct() { add_action('admin_menu', array($this, 'admin_menu')); } public function admin_menu() { wp_enqueue_style( "font-awesome", plugin_dir_url( __FILE__ ) . 'css/font-awesome.min.css', array(), false, 'all' ); add_menu_page('TEST_DEV', 'TEST_DEV', 'administrator', 'TEST_DEV_SLUG', array($this, 'show_TEST_page'), plugins_url('images/help.png', __FILE__)); } public function show_TEST_page() { ?> <div class="wrap"> <div class="container"> <div class="col-md-12"> <h1>Test</h1> <i class="fa fa-camera-retro fa-lg"></i> fa-lg <i class="fa fa-camera-retro fa-2x"></i> fa-2x <i class="fa fa-camera-retro fa-3x"></i> fa-3x <i class="fa fa-camera-retro fa-4x"></i> fa-4x <i class="fa fa-camera-retro fa-5x"></i> fa-5x </div> </div> </div> <?php } } $test_TEST_Use_FA_Icons_Admin_admin = new TEST_Use_FA_Icons_Admin(); ?>
- The topic ‘Glyphicons Dont Show in WordPress Plugin Only’ is closed to new replies.