X

How to Place Homepage-only Banner ads on WordPress site

If you are looking to place a banner ad selectively on your site’s homepage(somewhere in the sidebar, footer or elsewhere) and do not want it to appear on any other page of your site then you can follow this quick tutorial and get done with placement of your ad only on the homepage and nowhere else.

Please follow following steps as described below:

1. First, you need to enable PHP code in sidebar sections of WordPress. For this, you can use ‘PHP Code Widget’ plugin from WordPress Plugin library. Install and activate this plugin.

2. Next, you need to place your  banner ad code within ‘PHP code’ widget in your site’s sidebar in the following format.

—————————-

<?php
wp_reset_query();

if( (is_home()) || (is_front_page()) ) { ?>

PASTE YOUR AD CODE HERE

<?php } ?>

—————————-

3. You’re done.

Categories: Utility focussed
Prashant Sharma: <a title="About" href="http://www.techpluto.com/about-us/">Prashant Sharma</a> is a Delhi based Entrepreneur who spent most of his college days polishing his marketing skills and went for his first business venture at 19. Having tasted failure in his entrepreneurial debut, he turned a Tech-enthusiast, specializing in web technologies later. Join him on <a href="https://plus.google.com/110037121732872055442/?rel=author">Google Plus</a>
Related Post