Clickable Slider Images


first of all, thanks for the great Work and this amazing Theme!

I’m using the PHP code uploaded by @movin on January 11, 2016 as a solution to the Support request “Slider text and link for Activello WordPress theme” by erostorre here to make the pictures in the Slider clickable. (just this. I’m hiding all the texts with custom CSS)

This is working fine, but unfortunately, there are now also posts in the slider, which have no posthumbnail and therefore the slider disappears for the posts with no thumbnails and reappears when a post with a post thumbnail is featured.

The Slider should be show every post with thumbnail from the “Events” Category and ignore the ones without. You can watch this phenomenon here. (There are actual 2 posts without thumbnail and 1 with in the “Events” category)

I think it’s because of the if statement and that it is somehow always true:
if ( (function_exists( 'has_post_thumbnail' )) && ( has_post_thumbnail() ) ) :

But I couldn’t fix this problem. Do you have any idea how I can achieve this functionality?
I added you my child-theme functions.php. The Code for the Slider is at the bottom

Thank you in advance,

Hi @asaynisch,

I hope you are well today and thank you for your question.

You can achieve this by using the attached modified functions.php file.

Best Regards,

Hello @Movin,

Thank you very much. I hope you are well too.

The code is working perfectly! Even if the solution, as I can see it with my small PHP-skills, was very trivial… :smiley:

Best wishes,

You are most welcome here :slight_smile: