First of thanks for the plugin.
I can get it to work only on posts and pages, in custom post types the meta box appears but nothing happens on button click.
Seems that some javascript in not loaded. I follow the advice of the previous topic by Aagha Waheed and it works. If i comment the conditional code in line 193 of font-awesome.field.php everything works.
Also there’s a php warning on top of the admin area in WP-DEBUG in set to true:
Deprecated: Non-static method Font_Awesome_Field::instance() should not be called statically in /Users/…/wp-includes/class-wp-hook.php on line 298
Thanks
]]>public function styles_and_scripts() {
// only load the styles for eligable post types
if ( in_array( get_current_screen()->post_type, $this->screens ) ) {
// load up font awesome
wp_enqueue_style( ‘fa-field-fontawesome-css’, FA_URL . ‘css/font-awesome/css/font-awesome.min.css’ );
// load up plugin css
wp_enqueue_style( ‘fa-field-css’, FA_URL . ‘css/fa-field.css’ );
// load up plugin js
wp_enqueue_script( ‘fa-field-js’, FA_URL . ‘js/fa-field.js’, array( ‘jquery’ ) );
}
}
in this function comment the if condition like this
public function styles_and_scripts() {
// only load the styles for eligable post types
// if ( in_array( get_current_screen()->post_type, $this->screens ) ) {
// load up font awesome
wp_enqueue_style( ‘fa-field-fontawesome-css’, FA_URL . ‘css/font-awesome/css/font-awesome.min.css’ );
// load up plugin css
wp_enqueue_style( ‘fa-field-css’, FA_URL . ‘css/fa-field.css’ );
// load up plugin js
wp_enqueue_script( ‘fa-field-js’, FA_URL . ‘js/fa-field.js’, array( ‘jquery’ ) );
// }
}
, then it will work fine in custom post type
]]>Looks good. Perhaps also adjustable to work with custom post types?
]]>Thanks for this great plugin.
Been looking for one that selects a icon but this is by far the best.
Just one little doubt:
How do i make it appear in pages only?
Thanks
]]>