I have a problem with inserting a shortcode in <a> tag.
I build a website for a client, and there's an Easy Testimonial plugin where client enters all the information regarding testimonial in fields. There should be text link that opens an image gallery on click and obviously they need an option to edit that gallery.
I've attached the image below. The first field works correctly, the second one is what I'm asking about. As you can see, I've tried simply inserting the shortcode needed, but of course it doesn't work, because this whole thing works as a HTML link inside of <span> tag and it doesn't recognize PHP. I've tried adding shortcode starting it with <?php echo do_shortcode, but it doesn't work as well.
Also I must note that I'm not asking about this particular gallery plugin. I thought of using ACF here, but guess what, it opens as a regular link as well.
I would love to her any ideas upon that. Thank you.

The working example is to the top, the thing that I ask about is to the bottom

  • There is almost no instance where you would be able to put a shortcode or php into a form field like that and expect it to work. It looks like the plugin you're using (easy testimonial plugin) doesn't support what you're trying to do, but I suppose you could reach out to the authors and see if they can help.
    – Eckstein
    Jan 12, 2017 at 4:50

1 Answer 1


Alright, I've solved this problem with the usage of modal windows. I link to modal window which works alright, and the client can change the content of a modal.
To those who have similar problem, I may recommend considering some other ways of displaying things that you need to display.
Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.