Add Class to Neve Post Thumbnail
-
Hi, I have a plugin that requires me to specify the class of a IMG itself and not the wrapper for its functioning.
I am using Neve theme, and in order to make that plugin work with Neve, I need to somehow add a particular class to the thumbnail
tag itself.
Please help me with that
I tried editing
neve/inc/views/post_layout.php
and addedarray('class' => 'Milyin-Thumbnail-IMG-URL')
to make it work properly, but the issue is that upon updating the theme in future I shall have to rewrite that line.Please support me with a direct way of adding a class to neve post thumbnail, or if possible some way to override that specific file, I tried override through Child Theme but couldn’t rewrite as it is not a template file.
previously my IMG tag looked as follows
<img width="674" height="450" src="https://mlqatgay8yj9.i.optimole.com/1WIRvMI.Nhkc~18988/w:674/h:450/q:89/https://milyin.com/wp-content/uploads/2020/10/21-Proven-Ways-to-Earn-Money-From-Home-in-2020-5-is-a-new-Way.png" class="attachment-neve-blog size-neve-blog wp-post-image" alt="21 Proven Ways To Earn Money From Home In 2020 (#5 Is A New Way)" loading="lazy">
now I want it to be
<img width="674" height="450" src="https://mlqatgay8yj9.i.optimole.com/1WIRvMI.Nhkc~18988/w:674/h:450/q:89/https://milyin.com/wp-content/uploads/2020/10/21-Proven-Ways-to-Earn-Money-From-Home-in-2020-5-is-a-new-Way.png" class="Milyin-Thumbnail-IMG-URL attachment-neve-blog size-neve-blog wp-post-image" alt="21 Proven Ways To Earn Money From Home In 2020 (#5 Is A New Way)" loading="lazy">
Notice the extra class in the tag…
I could achieve this my editin theme files, which is not best practice so please help me with some better way..
The page I need help with: [log in to see the link]
- The topic ‘Add Class to Neve Post Thumbnail’ is closed to new replies.