Jagadeesh Badri
asked 10 years ago

Hi Team,
 
I have setup the news slider and I have setup the featured image for the post. Its displaying properly.
But i need to redirect to my post when the user clicks on the image in news slider.
May i know where in need to set up this?
Best Regards,
Jagadeesh Badri

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>'; ?>

 Hope this helps !

Jagadeesh Badri
replied 10 years ago

Its working as expected. Thank you so much.

Powered by DW Question & Answer Pro