Thesis Sidebar Teasers
What is it?
This plugin allows you to insert Thesis Teasers inside a sidebar. It doesn’t include all the options that you would normally expect. In a future release, it might.
Requirements:
This plugin for Wordpress requires that you’re using the Thesis theme (1.5 or higher.)
Download
Visit the plugin page on Wordpress.
CSS Styles
When you place the Thesis Teasers in your sidebars, it will inherit the same styles as your normal teasers. This means you have to override those styles with more specific styles. The most common style you’ll want to override is the width style so it fits into your sidebar. You can do it by adding the following code to your custom.css file:
#sidebars .teaser { width: 18em; }Questions & Comments?
Leave a comment on this page and I’ll respond as soon as I can.

{ 2 trackbacks }
{ 48 comments… read them below or add one }
Alright, I just added un updated version for Thesis 1.6. The updated version should probably work for Thesis 1.5 but I haven’t tested it yet. One shortcoming of the new version is that the image thumbnails are not linked to the posts. I’m working on a fix. If you know a way of fixing it, please email me at mr@melvinram.com.
Hey there…thanks for this, I appreciate it very much. I’m wondering if there’s a way to control the width of the widget…it seems to be busting out of my widget column. I’m testing it at http://www.jebdickerson.com if you’d like to check it out.
Thanks much…Jeb
Jeb,
Glad you’re finding it useful. You can control the width of the teaser inside the sidebar by adding this to your custom.css file:
#sidebars .teasers { width: 18em; }You can adjust the width (set to 18em in the above code) to whatever might suit you best.
~ mel
Hi Mel,
Thanks for the quick response. I tried that, and changed the 18em to 10em and nothing happened. Any thoughts on what I’m doing wrong? The other widgets I’m testing/using seem to be fitting fine, but not this one for some reason…thanks again.
Are you sure you added it? I don’t see it here: http://jebdickerson.com/wp-content/themes/thesis_15/custom/custom.css
Should be Thesis 1.6. Is it there?
Okay, it looks like it’s there. Small typo. Instead of:
#sidebars .teasers { width: 18em; }
You need:
#sidebars .teaser { width: 18em; }
Updated the page with info about the CSS.
Hi! I was wondering if there is a way to use this widget in a page layout? Say I have a static page about a certain activity, and after the page content I want to show the 5 most recent blog posts from the category that is related to those activities… is that possible? Best regards, Peter
Peter, if I understand you correctly, the answer is yes. What you’ll need to do is add use custom_functions.php to add a sidebar after the page/post. Then you can add the sidebar teasers just the same way as you normally would. Does that make sense?
I don’t suppose there’s any way of removing everything but the thumbnail image using CSS? I can get rid of everything apart from the comments link and the ‘Read Full Article’ link.
You can hide the “Read Full Article” link by adding this to your custom.css:
#sidebars .teaser_link { display: none; }
For the comments link, if you show me where you’re using it, I might be able to help.
The comments link is the one in a teaser that shows how many comments there are in the post.
You can turn that off from the Thesis Design Options page. Look for the Teasers > Teaser Display Options section and turn off the ‘number of comments link’ and hit that Big Ass Save Button
Just a heads up to everyone using the plugin, I was finally able to figure out how to add the plugin into the Wordpress plugin repository (http://wordpress.org/extend/plugins/thesis-sidebar-teasers/) so you should remove the plugin that you downloaded and install that one so that you can be notified when I update the plugin in the future.
Thank you so much for this Widget!! I came from the Arthemia Premium theme so I miss having these teasers on my blog. Great work!!
Just installed and got this error message:
Warning: Missing argument 1 for thesis_teaser(), called in /home2/fastcuts/public_html/wp-content/plugins/thesis-sidebar-teasers/thesis_sidebar_teasers.php on line 78 and defined in /home2/fastcuts/public_html/wp-content/themes/thesis/lib/functions/teasers.php on line 40
Any ideas?
Hmm, did you install from the Wordpress page?
I am having the same problem.
Hunter, what version of Thesis are you using? And are you installing the latest plugin from the Wordpress plugin directory?
Installed manually, now trying through Wordpress page.
Nope, still get the same error even after Wordpress install.
Looks like Kalengi identified the issue that might be causing problems on some installations. You can see it at:
http://www.webdesigncompany.net/thesis-sidebar-teasers/comment-page-1/#comment-354
I’ll post a comment once the plugin has been updated with this fix.
1.6 and yes i used the one from the Wordpress directory.
Hmm, I just created a brand new Wordpress website (2.8.7), uploaded Thesis 1.6 and installed the plugin from the wordpress plugin directory and it all worked: http://test.webdesigncompany.net
Can you provide me any other info / access that might help me help you?
I’m using 2.8.6. Does it not work for that version? Cus its the most stable Wrodpress version right now.
It does. I was using it on a 2.8.6 installation before 2.8.7 came out.
Warning: Missing argument 1 for thesis_teaser() in /nfs/c03/h04/mnt/57993/domains/layeredbyte.com/html/wp-content/themes/thesis_16/lib/functions/teasers.php on line 40
Thats the error message. The only other thing that I can give you is im using them in a separate sidebar below the content.
Let’s talk about this via gchat. I’ve sent you an invitation to chat. My gtalk username is mr@melvinram.com
Hi Melvin,
I also have the same problem as Hunter. Did you ever get to the bottom of it?
I located the surface problem. If you look at the definition of
thesis_teaser($classes, $post_count = false, $right = false)
in \wp-content\themes\thesis_16\lib\functions\teasers.php line 41, the argument $classes is overwritten with the value ‘teaser’. This means the it doesn’t matter what you pass to the function. It shall be overwritten anyway. It makes me wonder why in the first place the function is requiring that the $classes argument be supplied?? That’s a question for the Thesis team.
In this particular case, you can solve the problem by supplying a blank to the function. Go to the line 78 in \wp-content\plugins\thesis-sidebar-teasers\thesis_sidebar_teasers.php and replace:
thesis_teaser();
with
thesis_teaser(”);
That should silence PHP and allow the plugin to work as expected.
Remember I called this the ’surface problem’? This is because there must be a deeper reason why this bug is affecting some people and not others. Perhaps there are options that affect the way PHP treats such scenarios. Whatever the case, this fix should work fine.
Thanks Kalengi. I will update the plugin with this.
I’ve updated the plugin to version 1.1.3 which contains Kalengi’s fix.
Thanks very much Melvin! I’ll update to the new version.
Let me know if that fixes it.
The fix worked perfect! This was a very timely plugin for me. Thanks for the good work
I don’t know why but I put 3 widgets (to extract 1 post from 3 different categories) but I found the CSS is a bit messed up somehow. (unless the mistake is in mine). It’s kinda hard to explain but the post excerpt on the first widget is following the
“li.thesis_sidebar_teasers h3″ CSS even though the post teaser is clearly not in h3, only the title of the category. and so on…
Hi Melvin,
I’ve encountered a nasty side-effect of the plugin. It seems to be modifying the ‘global $post’ object while the page is still being rendered. I discovered this after spending hours trying to find out why my ‘thesis_hook_before_content_area’ and ‘thesis_hook_after_content_area’ hooks were not coordinating. On examining the post ids more closely, I discovered that the id at _before_content_area point was different from _after_content_area point, which shouldn’t be the case since I’m still on the same page. Tracking the second page_id revealed that it was the last post displayed by the sidebar teasers plugin.
I’ll try to find a work around since I’m on a tight schedule, but I’d have preferred if the plugin itself did not modify the ‘global $post’ object.
Hmm… I’ll update this today. I think I know a simple solution.
Thanks much! I’ll update as soon as you upload the fix.
Hi Melvin,
Thanks for the new update and sorry for not sounding appreciative earlier. I applied the update, but still had the same problem of the global post being altered. It turns out this isn’t your fault.
The nature of WordPress is that it expects only one post to be processed per full page. As a result, whenever you query new posts, the new query overwrites the main one. In addition, when you loop through the new query posts, the global post object is updated with each post.
I found a technique used by Lyza at http://bit.ly/7187t8 where the global objects are preserved while you retrieve and loop through a different set of posts. Applying this to your plugin, the body of sitespress_thesis_sidebar_teasers becomes:
global $wp_query;
global $post;
$main_query = clone $wp_query;
$main_post = clone $post;
$query_string = "category_name=" . $category . "&showposts=" . $posts;
$my_query = new WP_Query($query_string);
while ($my_query->have_posts()) : $my_query->the_post();
thesis_teaser('sidebar-teasers');
endwhile;
$wp_query = clone $main_query;
$post = clone $main_post;
setup_postdata($post);
Nice job on the plugin..
Thanks Mitch!
Everything is working properly, but, how do I make the font smaller. I believe I set the sidebar to 11px in the Options — I need to make smaller to match the other text
Thanks for your help in the superb chat box
Your solution to the custom.css file worked fantastically;
#sidebars .teaser { width: 18em;}
#sidebars .format_teaser p { font-size: 10px; }
maybe asking for a bit too much, but, is there anyway to exclude duplicate posts for the home page. (e.g, post in main content area do not appear in the side bar teaser area)
How do I get the teasers in the sidebar to pick up after the full posts end, instead of duplicating the full posts? Example, if I have two full posts, how do I get the third post to show up as the first teaser rather than the first post?
Thanks
@aboutyourbiz – that is currently not possible with the plugin.