append stylesheet via shortcode
here is a handy function i use a lot which is based on the_posts hook function check_for_shortcode($posts) { if ( empty($posts) ) return $posts; $flag = false; foreach ($posts as $post) { if ( stripos($post->post_content, ‘[YOUR_SHORTCODE_HERE’) ) $flag = true; break; } if ($flag){ //add scripts and styles here eg: //wp_enqueue_script //wp_enqueue_style } return $posts; … Read more