1.8.2

To place any types of ads after your first post on your home page, just add the following script to your custom_function.php file:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* Places Ad After The 1st Post */
function after_first_post_ad($post_count) {

  if (is_home()) {

    if ($post_count == 1) { ?>

      /* YOUR AD CODE GOES HERE IN PLACE OF THIS LINE - DELETE ME */

    <?php }

  }
}

add_action('thesis_hook_after_post', 'after_first_post_ad');

To place the ad after the 2nd only, just change all instances of the word "first" to "second" and change "if ($post_count == 1) { ?>" to "if ($post_count == 2) { ?>". Same method if you want to place an ad after 3rd, 4th, 5th, etc.

Many of us bloggers have run ads on our home page (after first post, after second post, etc), but how do you place an ad after your single post? "Single Post" meaning the page you see when clicking on either your permalink (offsite via Facebook, Twitter, etc.) or by clicking the post title on your home page. Below is the code you'll need to add to your custom_fuctions.php: Continue reading

Here's a simple line of code that you can add to your custom.css file to reduce or increase the gap between your widgets on your sidebar:

1
.custom li.widget {margin-bottom:0px !important;}

All you have to do is change "margin-bottom:0" to ex.: "margin-bottom:-10px" to decrease gap by 10 pixels or "margin-bottom:10px" to increase gap. Play with it till you get the desired result.

By decreasing the space, you can get more ads above the fold. ;)

The above code affects every widget in your sidebar(s) equally. There might be times when you need to only adjust the space between two particular widgets. In this case I found a crude but effective method.

Place a text widget in between the widgets that you want to adjust. Apply the following code to that text widget and save:

1
<div class="widget_space_1">

Next you need to edit your custom.css file and place the following code at the very bottom:

1
.widget_space_1 { margin-bottom: 0px; }

The css script above is set on 0px for no change. To add more space between the widgets, change 0px to something like 10px for example. If you want less space change 0px to -10px. You'll just have to play with it until you get the right spacing.

If you need to adjust the space between two other widgets, you just replicate the above code, but change from .widget_space_1 to .widget_space_2.

Hope this helps. :)

Categories

Impact
Search & Win

Link To Me

If you find anything useful, please