Hi,
I have custom field that returns a value for an icon depending on what the poster chooses in a select.
And right now I have solved it like this:
<img src=''<?php bloginfo('template_url'); ?>/dist/images/<?php echo esc_html($hTeam['value']); ?>-icon.svg'' />
(Nevermind the ‘’ instead of ", the code wouldn’t show otherwise)
It works but not perfect and I would much rather use @asset but I’m not sure how to break out of the asset tag and include the value?
<img src="@asset('images/'<?php echo esc_html($hTeam['value']); ?>'-icon.svg')" alt="">
The above doesn’t seem to work.
Could anyone help me what to do to get this working?