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 Make A Name For Your Brand In The Digital Era - August 3, 2022
- 8+ Useful WordPress Gutenberg Form Builder Plugins in 2022 - July 20, 2022
- How to Easily Use WordPress Reusable Blocks - July 18, 2022
Recent Comments