How To Display Link Directly To The Additional field image?
Hi guys! If you want to display link directly to your additional field image then you must change the default K2 code.
You can do it by inserting this following code in the item.php (remember to make a template override):
<? Php
$ Var = $ this-> item-> extraFields-> Image-> value;
$ Var = preg_replace (‘/ <img src = “/’,” “, $ var);
$ Var = preg_replace (‘/ “alt =” Image “\> /’,” “, $ var);
Echo ‘<a href=”‘ .varvar. “TextOfLink”.”;
Latest posts by LT Digital Team (Content & Marketing) (see all)
- What are joomla tags and how are the used? - November 3, 2024
- Why and how to create hidden menu items in Joomla? - October 31, 2024
- How to publish smartslider 3 to joomla 4? - October 31, 2024
Recent Comments