Introducing a brand new WordPress Thesis Theme for 2012 I specifically created for the Frugal Blogger. This two column custom theme has 4 built-in widgetized areas in the header and footer. Other built-in widget areas make switching out ads a breeze (Above content, below content, after posts, after 1st post only, after 2nd post only, after 3rd post only, below footer). Click HERE for the live demo. Email me for purchase instructions. Includes theme installation.


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
There are a bunch of jQuery plugins and standard HTML/CSS solutions out there for creating a full screen, or full page background image that will stretch the image to the full width of the browser window. So basically no matter what size the screen is, it will resize the image accordingly. Here are a few that I found while searching:
There are numerous variations for creating the full screen background image, depending on your needs. For example, you can have just a single image, a series of images that rotate, and also you could have content above the image or not. I was working on a website for a client and there was a need to have a series of full screen background images on the home page that rotate and have some content above the image.
I ended up going with bgStretcher, but now I had to make it work in Thesis.
When we talk about jQuery Plugins we aren’t talking about traditional WordPress type plugins. jQuery plugins need to get integrated into the site by adding the necessary code in the right places and referencing the required plugin file.
It doesn’t matter which method you use from the list above, and you may even find a different one you prefer, but the concept is the same. In fact, this is a great lesson about Thesis hooks and how to add pretty much any custom functionality or content. Once you understand the concept, you can integrate almost anything you want.
So, let’s take a look at this. We’re going to integrate this jQuery plugin to display a full page background image in Thesis.
You can visit the bgStretcher page to download the file you need. Specifically, you want the file called bgstretcher.js. Upload this file to a new folder inside your custom folder called “js”. So it will look like this: /wp-content/themes/thesis_x/custom/js. The file needs to be inside the ‘js’ folder.
Add this to your custom_functions.php file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
function fullbg() {
if (is_front_page()) {
?>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script><script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/custom/js/bgstretcher.js"></script>
<script type="text/javascript">// <![CDATA[
$(document).ready(function(){
// Initialize Backgound Stretcher
$(document).bgStretcher({
images: ['<?php bloginfo('template_directory'); ?>/custom/images/sample-1.jpg', '<?php bloginfo('template_directory'); ?>/custom/images/sample-2.jpg', '<?php bloginfo('template_directory'); ?>/custom/images/sample-3.jpg'],
imageWidth: 1024, imageHeight: 768
});
});
// ]]></script>
add_action('thesis_hook_after_html','fullbg');
|
Here’s what’s happening with this:
You will need to upload your images that are referenced in the above script to the images folder inside your custom folder.
You’re going to need to reference the css file supplied with this plugin. It’s called bgstretcher.css. You can either include this as a separate css file, which you will need reference in the head section of the site, or you can paste the contents into the custom.css file.
This is all you need to do in order to get the full page background images working. Now, if you want to add text above the image, you will just need to add this inside the custom.css file to the css selector that contains the content you want to appear above the image:
1 2 |
position: relative; z-index: 2; |
1 2 3 4 |
.custom .format_text {
position: relative;
z-index: 2;
}
|
Hopefully this all makes sense for you. If you have questions or something to add, feel free to leave a comment below.
source: Thesis-Blog.com