Connect with us

Themes

Jon Asked: How to add thumbnails above post on the THiCK theme

Published

on

I was asked by a reader:

I’m using the THiCK theme for my new design blog. I noticed you were able to add thumbnail images above your blog posts on the home page. What would I need to do to enable this on my blog?

Well Jon, this can be done very simple, since the theme is already using the Tim Thumb script.

What you will need to do is find in your index.php file, the second loop. Which you can find on line 40.

<?php query_posts('offset=1&showposts=' . get_option('woo_other_entries') . '&cat=-' . $GLOBALS['ex_asides'] ); ?>

<?php while (have_posts()) : the_post(); ?>	

	<div class="post">
		<h2><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
		<div class="post-meta"><?php the_time('j/m/y'); ?> <span>|</span> <?php comments_popup_link('0 Comments', '1 Comment', '% Comments'); ?></div>
		<?php the_excerpt(); ?>
	</div>

<?php endwhile; ?>

Now we are going to add in the code. At line 43 we are going to add:

<?php if (get_option('woo_resize')) { // Check if we should use the image resizer ?>
                    <a title="Continue reading this entry..." href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php echo bloginfo('template_url'); ?>/thumb.php?src=<?php echo get_post_meta($post->ID, "image", $single = true); ?>&amp;h=80&amp;w=280&amp;zc=1&amp;q=90" alt="<?php the_title(); ?>" /></a>
                <?php } else { ?>
                    <a title="Continue reading this entry..." href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php echo get_post_meta($post->ID, "image", $single = true); ?>" alt="<?php the_title(); ?>" /></a>
                <?php } ?>

That’s it, just make sure that in the THiCK options panel you choose the “resize” option, or the image might break the layout. Or you may change the this code: $post->ID, "image", to: $post->ID, "image_thumb", and use a separate image for the lower blog.

Continue Reading
11 Comments

11 Comments

  1. Jon Engle

    February 11, 2009 at 1:22 pm

    Thanks for the post! I’m going to try this out this afternoon.

    • frosty

      February 11, 2009 at 1:54 pm

      Absolutely, let me know how it goes!

  2. Thomas

    February 20, 2009 at 1:23 pm

    I tried this but the the image double up the main featured article. So I have the Large image and then the smaller thumbnail under it. Both lead to the same entry.

    • frosty

      February 20, 2009 at 5:30 pm

      Hmm, that’s seems odd.

  3. Thomas

    February 21, 2009 at 7:43 am

    Nevermind, I was inserting on the wrong line. Looks like it was Line 45 for me.

    • frosty

      February 21, 2009 at 7:17 pm

      Oh, Sorry about that. Maybe I shouldn’t write what line it may be on.
      Hope it works out! Just remember to look for the correct php code as well.

  4. cesar

    February 22, 2009 at 9:09 pm

    thanks for the post.
    I don’t know much about code, and I’m having the same problem of Thomas.
    Could you show the exacto point to insert the code?

    THANKS!!

  5. Bedava film izle

    March 20, 2009 at 7:21 am

    thanks for sharing.

    Bedava film izle´s last blog post..Lower Learning

  6. Adrian Vianna

    March 31, 2009 at 12:31 pm

    Worked out nicely. I have another questions where would we go to do this on the actual category post in this theme.

  7. Adrian Vianna

    March 31, 2009 at 12:56 pm

    Oh I got it. I added the same code in the first loop to the archives.php and you got a thumbnail for your category post.

    Adrian Vianna´s last blog post..Tiger Woods Most Dominant Ever?

    • Austin

      March 31, 2009 at 1:11 pm

      Yeah, that will take care of that! 🙂

You must be logged in to post a comment Login

Leave a Reply

Child

New theme release: CULT[i]VATE

Doing theme modification and even custom template files has brought me to this point. Today I’ve created my first premium theme, and since I am a huge fan of Hybrid, I decided that a child theme would be an appropriate starting point.

Published

on

So after some time playing with many options and idea’s I’ve finally released a premium theme. This theme, which I am calling CULT[i]VATE is a child theme.

Unfamiliar with child themes? You may want to check out this post Ian Stewart wrote.

CULT[i]VATE is a child theme of the Hybrid:

Hybrid is a user-friendly, search-engine optimized theme framework, featuring 14 custom page templates and 9 widget-ready areas, allowing you to create any type of site you want.

CULT[i]VATE includes four new widget-ready area’s and one custom accordion widget for one of the area’s. It also includes two front page templates.

This theme is for sale for $12.00 which you can purchase here. Looking for a demo?

[wp_eStore:product_id:1:end]

Continue Reading

News

WordCult Theme release 0.3

Published

on

I’ve had some time the last few days while my XPS computer has been having difficulties and the Dell replacement parts didn’t fix, what I know now to be a faulty LCD screen.

So I’ve made a few updates and changes to my WordCult theme. The new version is: 0.3.

Download it:

[download#3#format=1]

 

Update for 0.3:

A lot of changes to the core files, many files have been changed, removed and moved. So please if upgrading, backup your database. The core folder has been changed from wordcult2 to wordcult so you may want to just upload it as another theme and activate it.

For any other changes please view the changelog or view the readme file.
If you’ve noticed any issues please contact me or leave a comment.

 

Update for 0.3.0.1:

This was fast.. I forgot to add a function to my sub_page_menu :).

 

Update for 0.3.1.1:

Crucial update! Fixes an spelling error in the metaboxes.php file, which could pose an issue with your custom fields like the “image” dynamic resizer.

 

Continue Reading

Themes

Add additional meta boxes to Hybrid Theme

Published

on

At the time of writing this post I have Theme Hybrid as my parent theme, and am using a custom version of Hybrid News that Justin Tadlock offers to the public.

Well I want to tell you how you can add additional custom meta boxes to your child theme’s running the Hybrid Theme.

In your child function.php file just add the following to create a new post meta box:

/**
* Add additional post meta boxes
*
* by WPCult
*/
function wpcult_post_meta_boxes($meta_boxes) {
	$meta_boxes['image'] = array(
		'name' => 'image',
		'default' => '',
		'title' => __('Image:'),
		'type' => 'text',
		'show_description' => false,
		'description' => __('Please use a full size image, larger than 500px (this photo will dynamically re-size itself!'),
	);
	return $meta_boxes;
}
add_filter('hybrid_post_meta_boxes', 'wpcult_post_meta_boxes');

This will create a custom meta box called Image, and will create a custom field with the id of image.

Additionally you can create this on pages as well by copy/paste and replacing “post_meta_box” with “page_meta_box” every where inside the function.

Continue Reading

Random Search Terms

Title

Recent Posts: Fully Net Worth . com

Travis Hollman Net Worth- How Rich Is Stephanie Hollman’s Husband?

Travis Hollman Net Worth- How Rich Is Stephanie Hollman’s Husband?

Travis Hollman is a Businessman, innovator, and philanthropist. He is currently the President and CEO of Hollman Inc. which is a well-known company working on making sports, fitness, and office lockers. As of 2019, Travis Hollman net worth is estimated to be $20 million. His father had initially founded the company and formed the base […]

Michael Strahan Net Worth.

Michael Strahan Net Worth.

Michael Strahan Net Worth Who does not like that rigorous American Football game that makes your adrenaline take a toll even though you would be just sitting on a chair amongst the spectators?! Everyone does. The mere sight of the game is enough for people to make them sit on the edge of their seats […]

Mike Trout Net Worth: 5 Interesting Facts You Should Know

Mike Trout Net Worth: 5 Interesting Facts You Should Know

Michael Nelson Trout is an American professional baseball center fielder who plays for the Major League Baseball (MLB) team called Los Angeles Angels. He is a six-time winner of the Silver Slugger Award and has also won the Most Valuable Player two times. Here are five interesting facts about Mike Trout including his net worth, contract, personal life, wife and […]

YNW BSlime Net Worth: How Much is the Rapper Actually Worth?

YNW BSlime Net Worth: How Much is the Rapper Actually Worth?

YNW BSlime is an American rapper from Florida. He is known for working alongside his older brother YNW Melly. He has dropped tracks like Slime Dreams, Just Want You, and Gucci Belt. As of 2019, YNW BSlime net worth is estimated to be $150,000. YNW BSlime’s real name is Brandon King and was born on […]

Trending