Advertisement
fauzanjeg

Dequeue Style For Fix Conflict Style Between Template Kit and JNews Theme

Nov 9th, 2021
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.79 KB | None | 0 0
  1. /* Dequeue Style For Fix Conflict Style Between Template Kit and JNews Theme */
  2. function fix_conflict_style_template_kit_with_jnews_theme( $base ) {
  3.     $list_post_template_kit = array( 'home', 'dummy-page-elementor' ); /* List Post who use Template Kit by Slug Posts */
  4.     $current_post = get_post();
  5.  
  6.     if ( ! in_array( $current_post->post_name, $list_post_template_kit ) ) { /* Check Current Slug Post in List Post Template Kit or Not || if Not, Next */
  7.         if ( 'post-52423.css' === $base->get_file_name() ) { /* `post-52423.css` is CSS File Template Kit */
  8.             wp_dequeue_style( 'elementor-post-52423' ); /* To Not Use CSS File Template Kit || `elementor-post-52423` is Handle CSS Name */
  9.         }
  10.     }
  11. }
  12. add_action( 'elementor/css-file/post/enqueue', 'fix_conflict_style_template_kit_with_jnews_theme' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement