Responsive Slider Plugin with FlexSlider is not working

<?php //envato-flex-slider.php
Plugin Name: Envato FlexSlider
Plugin URI:
Description: A simple plugin that integrates FlexSlider ( with WordPress using custom post types!
Author: Your Name
Version: 1.0
Author URI: Your URL
define(‘EFS_PATH’, WP_PLUGIN_URL . ‘/’ . plugin_basename(dirname(__FILE__) ) . ‘/’ );
define(‘EFS_NAME’, “Envato FlexSlider”);
define (“EFS_VERSION”, “1.0”);
//end part 1——
wp_enqueue_script(‘flexslider’, EFS_PATH.’jquery.flexslider-min.js’,array(‘jquery’));
wp_enqueue_style(‘flexslider_css’, EFS_PATH.’flexslider.css’);
//end part 2——
function efs_script(){
print ‘<script type=”text/javascript” charset=”utf-8″>
jQuery(window).load(function() {
add_action(‘wp_head’, ‘efs_script’);
//part 3end
$slider= ‘<div class=”flexslider”>
<ul class=”slides”>’;
$efs_query= “post_type=slider-image”;
if (have_posts()) : while (have_posts()) : the_post();
$img= get_the_post_thumbnail( $post->ID, ‘large’ );

endwhile; endif; wp_reset_query();

$slider.= ‘</ul>

return $slider;
// /**add the shortcode for the slider- for use in editor**/
function efs_insert_slider($atts, $content=null){
$slider= efs_get_slider();
return $slider;
add_shortcode(‘ef_slider’, ‘efs_insert_slider’);
/**add template tag- for use in themes**/
function efs_slider(){
print efs_get_slider();
//part 4end
<?php //slider-img-type.php
define(‘CPT_NAME’, “Slider Images”);
define(‘CPT_SINGLE’, “Slider Image”);
define(‘CPT_TYPE’, “slider-image”);
add_theme_support(‘post-thumbnails’, array(‘slider-image’));
function efs_register() {
$args = array(
‘label’ => __(CPT_NAME),
‘singular_label’ => __(CPT_SINGLE),
‘public’ => true,
‘show_ui’ => true,
‘capability_type’ => ‘post’,
‘hierarchical’ => false,
‘rewrite’ => true,
‘supports’ => array(‘title’, ‘editor’, ‘thumbnail’)

register_post_type(CPT_TYPE , $args );
add_action(‘init’, ‘efs_register’);

Read more here:: Responsive Slider Plugin with FlexSlider is not working

Leave a Reply

Your email address will not be published. Required fields are marked *