Add a custom class to featured image 2
-
Hi, I’ve tried some solutions to add a custom class to featured image 2, but without success.
Besides, in the html output my featured image 2 has not any #id. This the output html:
<img width="1920" height="480" src="https://millennium.alecss.it/wp-content/uploads/2018/05/Belmonte-big.jpg" class="attachment-full size-full" alt="Belmonte collezione">
I have tried tu use a function in my function-php to ad custom classes:
function add_classes_featured_images() { if ( kdmfi_has_featured_image( 'featured-image-2') ) { the_post_thumbnail('thumbnail', array( 'class' => 'animated' , 'fadeIn' ) ); } } add_action('x_after_view_global__slider-below', 'add_classes_featured_images', 10);
But this doesn’t attach any new class.
Can you help me please?
Thank you very much
Alex
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Add a custom class to featured image 2’ is closed to new replies.