Tom Miron
asked 10 years ago

Hello,
 
I want to change the settings on my Newslider, so that when clicking on a different article, it just takes the reader directly to the article, rather then just flip the image on the slider.
 
Thanks!
 
Tom.

1 Answers
DominicStaff
answered 10 years ago

To resolve this issue, you can open thecustom.js file in the folder path “dw-focus>/assets/js/custom.js”. Find the line 34, remove the following code:

   // Slide controls

   $('.news-slider .other-entry li').on('click',function(e){

       e.preventDefault();

       var t = $(this);

       t.closest('.news-slider').find('.carousel').carousel( t.find('a').data('slice') );

   });

– Open the dw-focus-slider.php file in the folder path “dw-focus>/inc/widgets/dw-focus-slider.php” find the line 142, replace the following code:


  <h2><a data-slice="<?php echo $i; ?>" href="#top-store-<?php the_ID(); ?>"><?php the_title(); ?></a></h2>

With new code:

  <h2><a data-slice="<?php echo $i; ?>" href="<?php echo the_permalink(); ?>"><?php the_title(); ?></a></h2>

 Then Find the line 83, replace the following code:

<?php the_post_thumbnail('slider-thumb');  ?>

With new code:

<?php echo '<a target="_blank" href="'.get_permalink().'">'.get_the_post_thumbnail( get_the_ID(), 'slider-thumb' ).'</a>'; ?>

 

Tom Miron
replied 10 years ago

That’s perfect! Thank you 🙂

Powered by DW Question & Answer Pro