Adding Shortcode to PHP File in WordPress
-
I currently have the below code:
wp_mail( get_option( 'admin_email' ), "{$user->user_login}", "{$user->user_login} has logged in from a different computer." );
and I’m trying to add the Shortcode:
[whatsmyip ip='yes' country='yes']
My guess is that I need to add the below code somewhere where it needs to be added in the above code as I keep getting errors.
echo do_shortcode( '[whatsmyip ip='yes' country='yes']' );
Any ideas?
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Adding Shortcode to PHP File in WordPress’ is closed to new replies.