Je veux réaliser un code php pour mon site wordpress(index.php)

hihi21978 -  
 hihi21978 -
Bonsoir,
je veux réaliser un code php pour mon site wordpress pour le fichier index.php de telle façon que mon wordpress m'affiche deux pubs Adsense de taille 160X600px une à droite de mon site et l'autre à gauche mais le code que j'ai tenté de réaliser ne marche plus, pouviez-vous m'aider SVP.

Voici le code du fichier index.php:

<?php
echo "<html>";
echo "<head>";
echo "<meta name="google-site-verification" content="aujjtJ09WoFG20ZS8G7nk9Z27W-80qcZIWQJaLrdkGY" />";
echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />';
echo '<link rel="stylesheet" href="mycss2.css" type="text/css"></link>';
echo "</head>";
echo "<body>";
echo "<table width="100%" >";
echo "<tr>";
echo "<td Valign="top" width="150px">";
echo '<div id="pb1" style="width: 160px;height: 600px; top: -0.3%; position: fixed; right: 0px; float: right; direction: ltr;">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Ads1 160X600 -->
<ins class="adsbygoogle"
     style="display:inline-block;width:160px;height:600px"
     data-ad-client="ca-pub-4711105198148297"
     data-ad-slot="2872944122"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>';
echo "</td>";
echo "<td>";
?>
<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */
/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require('./wp-blog-header.php');
?>
<?php echo "</td>";
echo "<td  Valign="top" width="150px">";
echo '<div id="pb3" style="width: 160px; height: 600px; top: -0.3%; position: fixed; float: left; left: 0px;">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Ads2 160X600 -->
<ins class="adsbygoogle"
     style="display:inline-block;width:160px;height:600px"
     data-ad-client="ca-pub-4711105198148297"
     data-ad-slot="4349677322"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>';
echo "</td>"
echo "</tr>";
echo "</table>";
?>
<?php
echo "<div id="whos_user">";
echo '<div style="opacity:0">';
echo '<!-- Histats.com  START (hidden counter)-->
<script type="text/javascript">document.write(unescape("%3Cscript src=%27http://s10.histats.com/js15.js%27 type=%27text/javascript%27%3E%3C/script%3E"));</script>
<a href="http://www.histats.com" target="_blank" title="website free tracking" ><script  type="text/javascript" >
try {Histats.start(1,2186846,4,0,0,0,"");
Histats.track_hits();} catch(err){};
</script></a>
<noscript><a href="http://www.histats.com" target="_blank"><img  src="http://sstatic1.histats.com/0.gif?2186846&101" alt="website free tracking" border="0"></a></noscript>
<!-- Histats.com  END  -->';
echo "</div>";
echo "</div>";
echo "</body>";
echo "</html>";
?>
A voir également:

4 réponses

Rychima Messages postés 646 Date d'inscription   Statut Membre Dernière intervention   90
 
J'ai une question toute bête, pourquoi ne pas utiliser le plugin adsense pour Wordpress ?

https://wordpress.org/plugins/adsense-plugin/
0
hihi21978
 
merci pour ta réponse,
j'essaie d'"viter les plugins et en plus je veux que mon site soit dans une colone de milieu et l'adsense d'à gauche dans une autre cole et la dernière ads dans la colone de ladroite et le tous en php sans html pour n'avoir pas d"erreurs lors de l'éxécution
0
Rychima Messages postés 646 Date d'inscription   Statut Membre Dernière intervention   90
 
Je vois, je pense que ce tuto peu t'aider :
https://www.youtube.com/watch?v=O6wf_8u-SUA&feature=youtu.be
0
hihi21978
 
merci mais je veux réaliser des pub comme celles de ce site web www.chhiwati.com qui slide à coté du wrapper si possible SVP
0