guswhite
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Forum: Plugins
In reply to: [Shortcode Developer] Notice in shortcode-developer.phpI am also getting the same notice:
Notice: Undefined variable: html in /wp-content/plugins/shortcode-developer/shortcode-developer.php(137) : runtime-created function on line 16Forum: Fixing WordPress
In reply to: Conditionally enqueue a script if a custom post type existsin case anyone is looking, this works:
if ( is_front_page() && post_type_exists('featured_post') ) { // We are at the front page, and the post type 'featured_post' is registered. $hasposts = get_posts( 'post_type=featured_post' ); // lets check if there is any posts in the 'featured_post' post type. if( $hasposts ) { // If we found some posts, lets enqueue the script wp_enqueue_script ('flexslider-js'); } }Forum: Fixing WordPress
In reply to: Conditionally enqueue a script if a custom post type existsthis is the code that was working for sticky posts
if ( is_front_page() && is_sticky() ) { wp_enqueue_script ('flexslider-js'); }Thanks for the quick response and the info Joost, just what I needed to know! Fantastic plug in, thanks for all your hard work.
Viewing 4 replies - 1 through 4 (of 4 total)