hello i try insert adsense between 2 rows in album.php (zenpage theme), I tried the following code but it does not work
code adsense
where's my mistake ? ps: sorry for my bad english
First, if you want the count to start with 1 you should set $count = '';
Also check your nesting. Using endif is possible but really no one does. In the example the while loop is not closed, too.
sorry, I did not quite understand what you told me (I started in php and it is a bit complicated) if I put this (without php endif)
mon code asdense
" title=" ">
it gives me an error unexpected $end
If you don't use endif you still need to close the bracket. Please take the time to learn PHP basics at least first before trying to modify a theme.
It should look something like this:
`
">
fretzi thank you for your help, but your code does not work, nothing appears on my site. is that it works on yours ?
There is a $count++ missing after while (next_album()):
$count++
while (next_album()):
I really again like to recommend to get into PHP basics. This is fairly basic stuff and you will be rewarded the more you work on your site.
It works for me. This is the working and cleaned code for the next_album() loop on gallery.php of the Zenpage theme:
next_album()
gallery.php
` If it does not work then something must be wrong with the implementation of the AdSense code.
your code works perfectly, I'm just an idiot without memory, I had forgotten that I had left the cached pages I could not see advertising appear
thank you very much fretzel.
Good we finally managed (sorry, fretzl, missed somehow that you raise $count at the end but $count++ is nicer..:-)))