Adsense Shortcode aktivieren


/ Published in: PHP
Save to your folder(s)

Code in functions.php einfügen


Copy this code and paste it in your HTML
  1. function showads() {
  2. return '<div id="adsense"><script type="text/javascript"><!�
  3. google_ad_client = "pub-XXXXXXXXXXXXXX";
  4. google_ad_slot = "4668915978";
  5. google_ad_width = 468;
  6. google_ad_height = 60;
  7. //�>
  8. </script>
  9.  
  10. <script type="text/javascript"
  11. src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
  12. </script></div>';
  13. }
  14.  
  15. add_shortcode('adsense', 'showads');
  16.  
  17. <!-- Im Beitrag folgenden Code einfuegen -->
  18. [adsense]

URL: http://www.wpbeginner.com/wp-tutorials/25-extremely-useful-tricks-for-the-wordpress-functions-file/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.