How to Add Resource Box in Blog Posts

by Devesh on December 22, 2010 · 24 comments

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 Devesh
Devesh is a WordPress developer and blogger who loves to write about WordPress. You can follow him on Twitter at @devesh.

Google+ · Twitter · Visit my website →

{ 22 comments… read them below or add one }

Ileane December 22, 2010 at 3:52 pm

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?

Reply

Devesh December 23, 2010 at 3:07 am

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.

Reply

Andy @ FirstFound December 22, 2010 at 3:58 pm

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

Reply

Devesh December 23, 2010 at 3:08 am

Glad you like it Andy. Thanks for the comment!

Have a great day.

Reply

Tristan December 23, 2010 at 12:18 am

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

Reply

Devesh December 23, 2010 at 3:13 am

Glad you like it too ;) . Thanks for the awesome support, as usual.

Reply

Brankica December 23, 2010 at 12:30 am

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?

Reply

Devesh December 23, 2010 at 3:20 am

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.

Reply

Kevin December 23, 2010 at 9:13 am

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!

Reply

Devesh December 23, 2010 at 3:43 pm

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

Thanks for the nice comment kevin.

Reply

Kevin December 23, 2010 at 7:35 pm

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?

Reply

Devesh December 24, 2010 at 12:51 am

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.

Reply

Kevin December 24, 2010 at 5:41 am

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 :)

Reply

Tia December 23, 2010 at 12:08 pm

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

Reply

Devesh December 23, 2010 at 3:48 pm

Hey Tia,

Great to see you here and awesome thanks for sharing this post. Much appreciated.
Enjoy your holidays!

Reply

RinatisDinoro@SmartAboutThings December 24, 2010 at 9:20 am

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

thank you

Reply

Devesh December 24, 2010 at 3:06 pm

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.

Reply

Mavis Nong-Attraction Marketing Online December 24, 2010 at 11:39 am

Hey Dev,

Cool tip! Thanks for sharing this.

Enjoy your holidays!

Mavis

Reply

Devesh December 24, 2010 at 3:07 pm

Glad you like it Mavis.

You’re welcome and thanks for the awesome support.

Reply

Samuel December 25, 2010 at 10:39 am

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

Reply

Devesh December 25, 2010 at 12:18 pm

Yeah, it will work like a charm! Thanks for the comment Samuel.

Merry Christmas and Happy holidays!

Reply

Jimmy/Life Architect September 17, 2011 at 3:19 am

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

Reply

Leave a Comment



Previous post:

Next post: