Including Font Awesome in a Custom Theme

You can go about this in a number of ways. 1) Copy and paste the script tag containing your font-awesome kit in your footer.php before the closing body tag. 2) Using wp_enqueue_style. Below is a working example of a custom WordPress theme with FA enqueued: `function theme_enqueue_scripts() { wp_enqueue_style( ‘Font_Awesome’, ‘https://use.fontawesome.com/releases/v5.6.1/css/all.css‘ ); wp_enqueue_style( ‘Bootstrap_css’, get_template_directory_uri() … Read more

How Do I Unhook This Parent Theme Function?

wp_loaded would fire too early – you can’t remove a hook before it’s been added. I’d try adding your own hook with a higher priority, at the same level as the parent’s hook. That is, not inside an action. add_filter( ‘preprocess_comment’ , ‘my_preprocess_comment_function’, 5 ); Then within your function, remove the parent function: function my_preprocess_comment_function( … Read more

Enqueue script if not page template

You need to pass it as a function, or you already have but didn’t copy the whole code? If you did not do it, it should look something like this function page_template_not_enqueue() { if ( !is_page_template( ‘page-full-width.php’ ) ) { wp_enqueue_script( ‘flickity-js’, get_template_directory_uri() . ‘/js/flickity.js’, array(), filemtime( get_stylesheet_directory() . ‘/js/flickity.js’ ), true ); } } … Read more