How To Insert A Shortcode To An Existing Html Elements (wordpress)?
I need to insert a shortcode [ajaxdomainchecker] into an existing html code. I tried the following code but it shows error. Would you please let me know how to add the shortcode? S
Solution 1:
You have the right idea with the do_shortcode() command, but you can just put it right into your PHP file like so:
<?phpecho do_shortcode("[ajaxdomainchecker]"); ?>
Solution 2:
You can add the shortcode in your post where you enter the data in ACF input. And set your shortcode as a default value to that field. "Make a search and enter info" label as another ACF field that helps you change the text of the label whenever you want.
Post a Comment for "How To Insert A Shortcode To An Existing Html Elements (wordpress)?"