Show ads only on homepage in wordpress.

wordpress

Show ads only on homepage in WordPress.
This is the perfect code:

<?php if (is_home()) {
?>
Advertisement code which is displayed on homepage only
<?php
}
?>

Replace home with single to display ad on single page only.
Cheers :D

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Post a Comment

Your email is never shared. Required fields are marked *

*
*