![]() |
Wordpress code i am trying to alter some code on my site. I have an ad tag like this: <section style="text-align:center;"> <?php if (isset($page) && $page > 2) { get_adblock('above-content-ad1'); } ?> </section> It will show the ad tag (above-content-ad1) for all pages greater than page 2. I want to edit the code to show the ad tag on just odd (or even) numbered pages. Can someone please help me alter this code to reflect this? |
RE: wordpress code |
RE: Wordpress code Try <?php if (isset($page) && ($page % 2==0)) {//even pages get_adblock('above-content-ad1'); <?php if (isset($page) && ($page % 2!=0)) {//odd pages get_adblock('above-content-ad1'); } ?> |
RE: Wordpress code we can use this code... |
| All times are GMT -6. The time now is 12:02 PM. |