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)
- How to handle negative customer reviews - October 25, 2023
- Joomla! 5 release – What’re Joomla 5 new features? - October 20, 2023
- How to Upgrade Joomla! 4 to Joomla! 5 - October 20, 2023
Recent Comments