First upload the backstretch.js and theme-script.js file in js folder of your child theme. Here is the script of theme-script.js file jQuery(function( $ ){ $( “main.content .post .entry-image” ).each( function(){ var post_image = $(this).data( “entry-img” ); $(this).backstretch([BackStretchImg]=post_image,{duration:3000,fade:750}); }); }); Add the following code in your functions.php file: add_action( ‘wp_enqueue_scripts’, ‘enqueue_bs_script’ ); function enqueue_bs_script() { wp_enqueue_script(… Continue Reading
backstretch
Create a random order backstretch slider on home page
First upload the backstretch.js file in js folder of your child theme. Then add the following code in your functions.php file add_action( ‘wp_enqueue_scripts’, ‘enqueue_bs_script’ ); function enqueue_bs_script() { if( is_front_page() || is_home() ){ wp_enqueue_script( ‘backstretch-js’, get_bloginfo( ‘stylesheet_directory’ ) . ‘/js/backstretch.js’, array( ‘jquery’ ), ‘1.0.0’ ); } } add_action(‘wp_head’, ‘random_backstretch_slider’); function random_backstretch_slider(){ if( is_front_page() || is_home()… Continue Reading