Title: Ad code not sticking
Last modified: August 21, 2016

---

# Ad code not sticking

 *  [tek428](https://wordpress.org/support/users/tek428/)
 * (@tek428)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/ad-code-not-sticking/)
 * When I post my ad code into the boxes in the theme settings and save, the code
   doesn’t stick. The box becomes blank again. Am I supposed to paste the entire
   code or only a certain snippet?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Rodney Masenten](https://wordpress.org/support/users/rodneymasenten/)
 * (@rodneymasenten)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/ad-code-not-sticking/#post-3854529)
 * Yes, I am also facing same problem. Earlier version 2.0.0 works properly but 
   2.1.8 does not save adsense code.
 * Waiting for response from theme author.
 *  [Rodney Masenten](https://wordpress.org/support/users/rodneymasenten/)
 * (@rodneymasenten)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/ad-code-not-sticking/#post-3854562)
 * It seems support is not available for this theme.
 *  [Janusatsimlab](https://wordpress.org/support/users/janusatsimlab/)
 * (@janusatsimlab)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/ad-code-not-sticking/#post-3854650)
 * It took a couple of hours but I traced the adsense code not sticking to the adt_get_option
   procedure as defined, included here for illustration.
 * if ( ! function_exists( ‘adt_get_option’ ) ) :
    function adt_get_option($Aoption_name,
   $default = null) { return strip_tags(stripslashes(get_option($Aoption_name, $
   default))); }; endif;
 * An earlier version that was working lead me to the ‘strip_tags’ wrapper used 
   for options retrieval to prevent query injection.
    It had the unintended side
   affect of also stripping out the adsense code as well. Copied adt_get_option 
   code to adsense_get_option, removed the strip_tags and replaced the original 
   call with the new one for the adsense tags in the options page, functions.php
   and it now works, code, tags included, loads properly.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Ad code not sticking’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/adsticle/2.2.1/screenshot.png)
 * Adsticle
 * [Support Threads](https://wordpress.org/support/theme/adsticle/)
 * [Active Topics](https://wordpress.org/support/theme/adsticle/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/adsticle/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/adsticle/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Janusatsimlab](https://wordpress.org/support/users/janusatsimlab/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/ad-code-not-sticking/#post-3854650)
 * Status: not resolved