» » WordPress Thesis: Create Widget Area Before Content (Posts)

WordPress Thesis: Create Widget Area Before Content (Posts)

posted in: Thesis | 0

Have you ever wanted to place a slider, ad, photo, etc. above the content in it’s own static widget area? If you said “yes” and have the older WordPress Thesis Theme (Tested with v1.85 and under), check out the simple tutorial below:

Place the following code into your custom_functions.php

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php

/* Sidebar Before Content */
add_action('thesis_hook_before_content', 'beforecontent');
function beforecontent() {
?>

<div id="">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('beforecontent') ){ ?>
<?php } ?>
</div>
<?php
}
?>

<?php
register_sidebar(array('name'=>'BeforeContent', 'before_title'=>'<h2>', 'after_title'=>'</h2>'));
?>

WordPress Rocks! If you can dream it, I can create it!
Like this article? Please click below to share it. Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *