Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author TT Themes

    (@tomastoman)

    Hi,

    please open the “header.php” file and search there for the following code:

    <?php if ( $papercuts_options_db['papercuts_display_search_form'] != 'Hide' && !is_page_template('template-landing-page.php') ) { ?>
    <?php get_search_form(); ?>
    <?php } ?>

    Replace it with your AdSense code. I recommend you to wrap the AdSense code into the following HTML markup:

    <div class="header-banner">your AdSense code goes here</div>

    Then, you can style the AdSense banner using the following CSS (feel free to modify the code if needed, especially the values “top: 20px; right: 20px;” to set the appropriate position in header):

    .header-content .header-banner {position: absolute; top: 20px; right: 20px;}
    @media screen and (max-width: 1012px) {#wrapper .header-content .header-banner {position: relative; top: 0; right: 0; margin: 20px 0 0; max-width: 100%; float: left;}}

    Note: Instead of modifying the original theme, I recommend you to create a child theme.

    Best regards
    Tomas Toman – TT Themes

    Thread Starter ahranchwi

    (@ahranchwi)

    Thank you for replying.
    But where can i put the code:

    .header-content .header-banner {position: absolute; top: 20px; right: 20px;}
    @media screen and (max-width: 1012px) {#wrapper .header-content .header-banner {position: relative; top: 0; right: 0; margin: 20px 0 0; max-width: 100%; float: left;}}

    Theme Author TT Themes

    (@tomastoman)

    I recommend you to place th custom CSS into “Theme Options > Other Settings > Custom CSS”.

    Best regards
    Tomas Toman – TT Themes

    Thread Starter ahranchwi

    (@ahranchwi)

    Its working ??
    Thank you sir ??

    Theme Author TT Themes

    (@tomastoman)

    You are welcome! ??

    Best regards,
    Tomas Toman

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How can i change the header Search Form to Adsense?’ is closed to new replies.