• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Consultation
  • Full Access
  • Log in

Display Banner Ads In Genesis

Displaying Banners ads, Google Adsense or any type of HTML, Image or links in Genesis is very easy.

WordPress offers a large range of conditional tags which make the job easy.

You could paste your HTML or ad code into a hook location using the Genesis Simple Hooks plugin.

The only problem is your ads will also be displayed on archive pages.

That’s why the conditional tags are so useful.

Genesis Simple Hooks Plugin

After installing this plugin, simply paste the code below into the hook location want to display your ads.

Genesis Simple Hook Locations

Execute Code

On Single Posts

<?php if (is_single() ) { ?>
<p>Code-Goes-Here</p>
<?php } ?>

On Single Posts and Pages

<?php if ( is_page() || is_single() ) { ?>
<p>Code-Goes-Here</p>
<?php } ?>

On Pages

<?php if (is_page() ) { ?>
<p>Code-Goes-Here</p>
<?php } ?>

On All Category Archives

<?php if (is_category() ) { ?>
<p>Code-Goes-Here</p>
<?php } ?>

By Post Type

<?php if ( 'book' == get_post_type() ) { ?>
<p>Code-Goes-Here</p>
<?php } ?>

When using images as your ads, you can use the Advanced Image Settings to:

  • Add horizontal and vertical spacing to banner images
  • Add a border to your banner ads

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.