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.