December 07, 2010

Thumbnails in Wordpress 2.9+ and 3.0+

Now that Wordpress added a thumbnail feature (2.9+), we longer need to assign custom fields and give them values each time we write a blog post. Insted, while writing a blog post, there is a small panel or block to the side that allows us to choose a thumbnail for the post.

However, for people like me, who have been using custom fields to show pictures for sometime, there is a decision to be made. Should we stick to the custom fields and just continuou using them or should we start using the core thumbnails featre instead?

Well, you don't really have to the choose one of these two, you will keep using them both. How you ask? Well, simply, stop using custom fields for any new posts you write and use the thumbnail feature to assign thumbnails to blog posts. Then, edit your templates and add some simple conditions so that Wordpress checks whenever a blog post is viewed if it has a custom field thumbnail or a core wordpress 2.9+ thumbnail. By doing this, your old blog posts thumbnails will still show and your new thumbnails, the one you assign using the new feature will also show.

Honestly, I was very worried about having to choose one of these two, and since I am not a programmer/developer/coder, I was worried that I wouldn't be able to figure this out. However, with some thinking and imagination and with the help of a number of great Wordpress articles I was able to use my thumbnails in my Blog homepage. Not only that, but using some of the new features related to thumbnails, I was actually able to set specific sizes for the different pages in my blog. For example, on my homepage, all posts thumbnails are 100px x 75px. However, when a visitor clicks on a certain blog post to view it, he is shown the same picture but in a different size, say 200px x75px. This is really nice and it's really simple to achieve.

As I said, I am not a programmer and I was able to figure this out with the help of the following resources. There is no reason why you shouldn't be able to get similar results :). I would also like to thank each one of those blog authors:

If anyone (not good with coding as I am) wants to look at the code I have used in my template pages to show the thumbnails, I would be happy to share.

If you want to check what I was talking about, you can visit my Arabic Research Blog. Don't ming the language, but make note of the thumbnails then follow some of them to the post view page to see if the thumbnail's dimension will change or not. Please note that because some of the thumbnails are actually cropped, they might not show in a bigger size if you follow them to the post.


- No comments Not publicly viewable


Add a comment

You are not allowed to comment on this entry as it has restricted commenting permissions.

Trackbacks

Books I Enjoyed

As I buy/view books, I update this list with the books that I most liked:
[View my Book List]

Little About me


Abdulrahman Hariri's Picture

Name: Abdulrahman Hariri

PhD student at WMG.

I’ve started a research education website in 2009 to help people from the Middle East learn how to do scientific research. The website continues to attract tens of thousands each month and has over half a million followers on social media.





My Websites (in Arabic):
البحث العلمي
الأكاديمية التعليمية
الابتكار و ريادة الأعمال


Contact Me

[Click Here to Find More About me]

Search this blog

Tags

Most recent comments

  • Hi Ruhamah, I would first call customer service and ensure that there is a record for you calling wi… by Abdulrahman Hariri on this entry
  • guys i am having a hell of a bad time with IKEA just recently bought a three door wardrobe ASPELUND … by Ruhamah on this entry
  • Replica pimp web–site will be the forerunner in promoting extremely very best replica watches. And t… by Replica rolex watches on this entry
  • Hi Hadi, Thanks for your comment. I appreciate you getting me their contact information, I will go a… by Abdulrahman Hariri on this entry
  • Hello Hariri, I go mad with such companies, acting like if they own the customer and have plenty of … by Hadi on this entry

Blog archive

Loading…
Not signed in
Sign in

Powered by BlogBuilder
© MMXIV