Mike Smith
asked 6 years ago

On my site (http://www.asiaoptions.org) I’m trying to turn the article headings in the featured slider on the homepage into links (at the moment nothing happens when you click on them. 
How do I do this?
Daniel

1 Answers
DominicStaff
answered 6 years ago

To resolve this issue, you can open the custom.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 !

Mike Smith
replied 6 years ago

Hi Dominic, I tried changing this – but it doesn’t seem to have worked!Any other ideas?Dan

Mike Smith
replied 6 years ago

Hold on – it actually did work! But the slider has stopped ‘scrolling’ through the articles, nor does the little circle things at the bottom work to see the other articles without going to their page. Is there any way to fix this?

Dominic Staff
replied 6 years ago

Please send me username & password of your site (via private answer) for further checking.

Powered by DW Question & Answer Pro