Ali Tassavor
asked 7 years ago

Hello,

Is there a way to have the whole image on the slider carousel as a link to the article instead of just the just text title?

2 Answers
DominicStaff
answered 7 years ago

To resolve this problem, you can open the dw-focus-slider.php file in the folder path “wp-content\themes\dw-focus\inc\widgets” / line 84

Replace the following code:

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

with the new code:

 
<?php echo '<a href="'.get_permalink().'">'; the_post_thumbnail('slider-thumb');echo '</a>'; ?>

Hope this helps !

Regards,
Dominic

martywatts
replied 7 years ago

I tried this, it is line 86 now. When I made this change, I got this error when reloading my site. (Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’ in /home/content/55/11141255/html/devasf/wp-content/themes/dw-focus/inc/widgets/dw-focus-slider.php on line 86) I changed it back, but want this capability. Let me know how to fix.

DominicStaff
answered 7 years ago

you can use the following code:


<?php echo '<a href="'.get_permalink().'">'; the_post_thumbnail('slider-thumb');echo '</a>'; ?>

Regards,
Dominic

Powered by DW Question & Answer Pro