How to Add Resource Box in Blog Posts

On my other blog i’m using a little box after each posts to show some affiliate products. It is a type of resource boxMany People have ask me about how to add resource box in wordpress in blog posts. In this post i’m going to share the code to add the resource box after each blog posts.

Benefits of Having a resource box

  1. Make money by recommending to your blog readers
  2. Connect with your blog audience
  3. Add a weird message or whatever you want

First of all downalod the image of stop sign from here – Download

Add this code in single.php after the content

<div class="resource_box"> <h3>We Recommend:</h3>
 <ul>
 <li><a href="http://www.technshare.com/go/thesis" rel="external" target="_blank">Thesis Theme</a> because we could add more power to our blog. Thesis is for people who want to take full-control of their site and customize it to their.</li>
 <li><a href="http://wpkeywordwinner.com/recommend/keywordwin" rel="external" target="_blank">Keyword Winner</a> is a premium wordpress plugin that enables you to do the keyword research right from your wordpress dashboard.</li>
 </ul>
 </div>

For Thesis Users

Add this code in single.php after the content

/* Resource Box */
function post_footer2() {
 if (is_single())
 {
 ?>
 <div class="resource_box">
 <h3>We Recommend:</h3>
 <ul>
 <li><a href="http://www.technshare.com/go/thesis" rel="external" target="_blank">Thesis Theme</a> because we could add more power to our blog. Thesis is for people who want to take full-control of their site and customize it to their.</li>
 <li><a href="http://wpkeywordwinner.com/recommend/keywordwin" rel="external" target="_blank">Keyword Winner</a> is a premium wordpress plugin that enables you to do the keyword research right from your wordpress dashboard.</li>
 </ul>
 </div>
  <?php
 }
}
 add_action('thesis_hook_after_post', 'post_footer2');

Add this code in your stylesheet (style.css) and for thesis users add this in custom.css

.resource_box { width:425px; margin-top:15px; height:165px; margin-left:-3px; border: 3.9px dashed #696969; padding-left:160px;padding-bottom:35px; background: transparent url('http://technshare.com/wp-content/themes/thesis_188/custom/images/stop3.png') no-repeat 10px 50%;}
.resource_box:hover {border:dashed 3.9px #2f9dcf; background: #eee url('http://technshare.com/wp-content/themes/thesis_188/custom/images/stop3.png') no-repeat 10px 50%;}
.resource_box h3 { color:#0e87c0; padding-top:0px; margin-top:16px; font-size:20px;color:#0E87C0;font-weight:bold;line-height:0;}
.resource_box ul { width:390px;}

Some sites that show resource box in blog posts are Technshare and FamousBloggers?

  • Do you find this post useful or have anything to add?
  • Do you ever thought of adding resource box?
About the Author: Devesh Sharma is a WordPress fanatic and loves experimenting with WordPress themes & plugins. Get more from Devesh on  and Twitter.

You May Also Like:

25 comments… add one
  1. Thanks Dev, I need to spend more time learning how to add this codes. I’m using a theme called Magazine Premium (I use the basic version on my other blog too). Which PHP file do I add this code to?

    • You’re welcome Ileane.
      You have to add that code in single.php file after the content tag and the css code in style.css!

      Thanks for the nice comment.

  2. Andy @ FirstFound says:

    Excellent guide, this’ll be very helpful. Cheers!

  3. Yeah! I was actually wondering how you did that. I’ll definitely use the Thesis version on my blog :) Thanks Devesh!

  4. OK, I like the idea but I need more help to do this :)
    I am using Atahualpa theme and I need help with you telling me what does this mean:
    “Add this code in single.php after the content”
    Does this mean I will have the box after every post?
    And can I change it for each post?

    • Actually you have to add the code in the single.php file but you’re using Atahualpha theme, it’s already have an option to add codes after the content.

      Just look for the single page options in that theme and add the code there.

      Thanks for the nice comment. Have a great day Brankica.

      If you need any help, then don’t hesitate to contact me.

  5. This is exactly what I’m looking for! I want to monetize my blog for 2011 and I think starting with the blog post is the best way to do it. Thanks Devesh for posting this great tip!

    • That’s great to hear kevin and glad you like it too.

      Thanks for the nice comment kevin.

      • I copied everything almost the same with some slight changes but it’s not coming out right? If you check out after my post you’ll see that it only has the writing. The image and border won’t show? Did I do something wrong?

        • Hey kevin,

          Yeah, i missed div tag. Copy again, now it will work!

          Thanks. If you need any help then don’t hesitate to contact us.
          Enjoy your holidays.

          • Hey Devesh,

            I copied it again but this time it gave me an error. My blog went out. I couldn’t access anything so I erased it through my hosting account. Pheww I thought it was serious there for a moment :)

  6. Nice post, Dev. Tweeted and Dugg! I know people will be able to use this info.

  7. RinatisDinoro@SmartAboutThings says:

    I am surprised nobody asked this – “will thit work on a non-thesis theme?”

    thank you

    • I think you didn’t read the post carefully. If you’re not using thesis, then simply paste the code in single.php and add the css in your stylesheet file.

      Thanks for the comment Rinatis.

  8. Mavis Nong-Attraction Marketing Online says:

    Hey Dev,

    Cool tip! Thanks for sharing this.

    Enjoy your holidays!

    Mavis

  9. Can I add the code to thesis hook pluggin? I’m scared of destroying the theme :)

  10. Jimmy/Life Architect says:

    Hi Devesh,

    I am not a techy guy. I certainly appreciate this type of simple procedures to have something powerful set up for my blog posts.

    Cheers

  11. Carol Mothersill says:

    Thanks for sharing this article! I found it to be very helpful!

Speak Your Mind...

A Weekly WordPress Newsletter...

Subscribe now and you will get -

»  Free Guide – Building a Successful WordPress Blog.
»  Weekly Newsletter curating useful blog posts and resources.
»  Exclusive Discount & Deals on Premium Products.

Your email will never be shared with anyone.