// ADD-ON PLAYER FILES ENCASE WE HAVE VIDEO
wp_enqueue_script(‘video’, get_template_directory_uri().’/framework/player/mediaelement-and-player.min.js’);
wp_enqueue_script(‘video’);
// ADD IN TOOLBOX FOR AUTHOR DATA
add_action(‘hook_single_after’,array($CORE, ‘AUTHOR_TOOLBOX’) );
which says if ‘x’ example wp_enqueue_script(‘slider’, get_template_directory_uri().’/framework/slider/jquery.flexslider-min.js’);
wp_enqueue_script(‘slider’);
then print in header the css and js for flexslider, but I have found that this is not working as intended, if there is no flex slider or outhes ie pretty phot the code is still printed in the header.
In the code you have:
/* =============================================================================
LOAD PAGE TEMPLATE
========================================================================== */
$GLOBALS[‘flag-single’] = 1;
// ADD-ON PLAYER FILES ENCASE WE HAVE VIDEO
wp_enqueue_script(‘video’, get_template_directory_uri().’/framework/player/mediaelement-and-player.min.js’);
wp_enqueue_script(‘video’);
wp_enqueue_style(‘video’, get_template_directory_uri().’/framework/player/mediaelementplayer.min.css’);
wp_enqueue_style(‘video’);
// ADD-ON SLIDER STYLES
wp_enqueue_script(‘slider’, get_template_directory_uri().’/framework/slider/jquery.flexslider-min.js’);
wp_enqueue_script(‘slider’);
wp_enqueue_script(‘prettyphoto’, get_template_directory_uri().’/framework/slider/jquery.prettyPhoto.js’);
wp_enqueue_script(‘prettyphoto’);
wp_enqueue_style(‘slider’, get_template_directory_uri().’/framework/slider/flexslider.css’);
wp_enqueue_style(‘slider’);
wp_enqueue_style(‘prettyphoto’, get_template_directory_uri().’/framework/slider/prettyPhoto.css’);
wp_enqueue_style(‘prettyphoto’);
// UPDATE VIEW COUNTER
$CORE->HITCOUNTER($post->ID);
// ADD IN TOOLBOX FOR AUTHOR DATA
add_action(‘hook_single_after’,array($CORE, ‘AUTHOR_TOOLBOX’) );
which says if ‘x’ example wp_enqueue_script(‘slider’, get_template_directory_uri().’/framework/slider/jquery.flexslider-min.js’);
wp_enqueue_script(‘slider’);
then print in header the css and js for flexslider, but I have found that this is not working as intended, if there is no flex slider or outhes ie pretty phot the code is still printed in the header.
Members Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login Now