Skip to content
This repository has been archived by the owner on Aug 12, 2023. It is now read-only.

First method, php echo, doesn't add "class"! #59

Open
ersinco opened this issue Jun 13, 2023 · 0 comments
Open

First method, php echo, doesn't add "class"! #59

ersinco opened this issue Jun 13, 2023 · 0 comments

Comments

@ersinco
Copy link

ersinco commented Jun 13, 2023

<?php echo fly_get_attachment_image( get_post_thumbnail_id(), 'test150', array('class' => 'app-image') ); ?>

It pulls the image with the ID "test150", but cannot pull the "class" attribute.

Unfortunately, I need to use the other method to add a class. Please allow adding class to first method.

<?php $imagept = fly_get_attachment_image_src( get_post_thumbnail_id(), 'test150' ); echo '<img src="' . $imagept['src'] . '" width="' . $imagept['width'] . '" height="' . $imagept['height'] . '" class="app-image" />'; ?>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant