Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Subharanjan

    (@subharanjan)

    Hi sethbahookey,

    I am sorry about the trouble. Currently, there is no option in the settings to load the slider in paused mode, however, you can use the API provided in the plugin to customize the code and functionality as per your need. tw_testimonials_js hook can be used for your current need. https://github.com/michael-cannon/testimonials-widget/blob/master/API.md

    Code to load the slider in paused mode:

    add_filter( 'tw_testimonials_js', 'bxslider_js_autostart', 10, 4 );
    
    	function bxslider_js_autostart( $scripts, $testimonials, $atts, $widget_number ) {
    		$id      = Axl_Testimonials_Widget::ID;
    		$id_base = $id . $widget_number;
    		if ( empty( $scripts[ $id_base ] ) ) {
    			return $scripts;
    		}
    
    		switch ( $atts['type'] ) {
    			case 'testimonials_slider':
    				$find       = 'slideMargin: 2';
    				$bxslider = <<<EOD
    				autoStart: false
    EOD;
    				$script = $scripts[ $id_base ];
    				$script = str_replace( "\t{$find}", "\t{$find},\n{$bxslider}", $script );
    				$scripts[ $id_base ] = $script;
    				break;
    		}
    		return $scripts;
    	}

    Add the above code into the functions.php file of your current theme ( child theme ).

    Thanks !!

    Thread Starter sethbahookey

    (@sethbahookey)

    Thanks for the quick response!! I tried copy pasting what you gave me but it caused an error.

    FATAL ERROR: CLASS ‘AXL_TESTIMONIALS_WIDGET’ NOT FOUND IN C:\WAMP\WWW\EDGE_FITNESS\WP-CONTENT\THEMES\MINIMUM-PRO\FUNCTIONS.PHP ON LINE 230

    Any ideas?

    Thanks again!

    Plugin Author Subharanjan

    (@subharanjan)

    Hi,

    It seems, you haven’t upgraded the plugin to the latest version yet. Please upgrade the plugin and this fatal error will be solved.

    Thanks !

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to start widget slider, paused?’ is closed to new replies.