Viewing 1 replies (of 1 total)
  • I did that patch in frontend/class-frontend in add_frontent_styles:

    global $post;
                if ( is_a( $post, 'WP_Post' )	&& has_shortcode( $post->post_content, 'wpsl' ) ) {
                    $min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
    
                    wp_enqueue_style( 'wpsl-styles', WPSL_URL . 'css/styles'. $min .'.css', '', WPSL_VERSION_NUM );
                }
Viewing 1 replies (of 1 total)
  • The topic ‘Enqueue css just in pages with shortcode’ is closed to new replies.