Skip to contentSkip to sidebarSkip to footer

How to Place Homepage-only Banner ads on WordPress site

competitionx-home-mid-large-bannerIf 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.

This Pop-up Is Included in the Theme
Best Choice for Creatives
Purchase Now