Insert Ad After Content

This document is deprecated! The information on this page refers to a Thesis version that is now obsolete. Please visit the Thesis Docs for current documentation.

Ad After Content โˆž

Place this code in custom_functions.php:

function after_content_ad() { ?>
// INSERT YOUR AD CODE HERE
<?php }

add_action('thesis_hook_after_content', 'after_content_ad', 1);

Ad on Single Post Only โˆž

Place this code in custom_functions.php:

function single_post_ads() {
if (is_single()) { ?>
// INSERT YOUR AD CODE HERE
<?php }
}

add_action('thesis_hook_after_post', 'single_post_ads');

Ad on Pages Only โˆž

Place this code in custom_functions.php:

function page_ads() {
if (is_page()) { ?>
// INSERT YOUR AD CODE HERE
<?php }
}

add_action('thesis_hook_after_post', 'page_ads');

Ad After First Post Only on Home Page โˆž

Place this code in custom_functions.php:

function after_first_post_ad($post_count) {
  if (is_home()) {
    if ($post_count == 1) { ?>
       // INSERT YOUR AD CODE HERE
    <?php }
  }
}

add_action('thesis_hook_after_post', 'after_first_post_ad');

Related Resources: