Problems with adding shortcode
-
I’m trying to add shortcodes for my adsense ads and am experiencing problems. Here is the code that I am adding to the functions.php of my Child Theme.
function google_adsense1() { return '<script type="text/javascript"><!-- google_ad_client = "<em>your client id</em>"; google_ad_slot = "<em>your ad slot id</em>"; google_ad_width = <em>width</em>; google_ad_height = <em>height</em>; //--> </script> <script type="text/javascript" src="https://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> '; } add_shortcode('adsense1', 'google_adsense1');
Of course I am replacing what I need to with my ads information. When I add the [adsense1] to the text view of my page and update, the screen goes white. Normal functioning of my dashboard will not resume until I delete the functions.php on the remote server.
What am I doing wrong here?
Thanks!
Corey
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Problems with adding shortcode’ is closed to new replies.