hello experts , i want to hide adsense ads on first page if post url domain.com/top-10-foods don't display if domain.com/top-10-foods/2 display if domain.com/top-10-foods/3 dispaly extra ....
i've tried this code did't work
<?php if(!is_post_url()); ?>
<div id="myAd"></div>
<?php endif; ?>
i want to replace this code
<?php if(!is_post_url()); ?>
i'll be thankfull
You are looking for the current page number in the context of pagination:
$pageNum = (get_query_var('paged')) ? get_query_var('paged') : 1;
if ($pageNum > 1) {
// …
}
Please see WordPress Stack exchange for WordPress specific questions.
Also see the docs on pagination:
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments