How to call shortcode on button click
You can’t add a shortcode to PHP directly. However, each shortcode executes a function, so you can just add that function to your link code. If your shortcode is something like this: function my_custom_shortcode( $atts, $content= NULL) { shortcode function } add_shortcode ( ‘my_custom_shortcode’ , ‘my_custom_shortcode’ ); use this in your link: <a href=”https://wordpress.stackexchange.com/questions/253796/<?php my_custom_shortcode(); … Read more