One Way To Use Custom Fields

This is not a beginner level tutorial. If you don’t know anything about XHTML and PHP, you will get lost.

Recently, I learned how to manipulate custom fields from theundersigned.net. Today, I finally switched from excerpts to custom fields to display theme thumbnails on Wpdesigner. I’m talking about the three theme blocks in the header. Each block has an image, the theme’s name, theme author’s name and link, and the download page link.

theme thumbnail screenshot highlight

Before making the switch

Here’s a normal theme post:

theme post screenshot

Here’s its optional excerpt information, which would be what I’d use to display a theme thumbnail block:

theme post excerpt screenshot

And here’s the source codes for displaying the excerpts.

As you can tell, each excerpt is unique. If I were to continue using excerpts to store theme information, a decision to change up the theme thumbnail block template (even a small change) would make the change a daunting task. I would have to edit every excerpt.

After the switch

To some recent theme posts, I added the following custom fields or custom field keys: Theme Name, Theme Author, Theme Author Link, Download Page, and Theme Thumbnail. The keys’ values depend on the theme’s information.

custom fields screenshot

And here’s the source codes for displaying custom fields.

The Big Difference

Now, I can easily manipulate the custom field values to display the themes’ information. Also, I can easily make template changes that would affect every thumbnail block. For example, if I wanted to display the download page link before the author’s link, I would change the source codes to display the download page link first, instead of having to edit one excerpt at the time to get all the thumbnail blocks to match each other. Imagine having to edit 1000 excerpts instead of switching some source codes around. Big difference huh?

Why I switched to custom fields

Wpdesigner only display the three most recent theme posts in the header so why bother with switching to custom fields? I have to. My goal is to change up the WordPress theme category page to display only theme thumbnail blocks. That way, you’ll be able to browse through more themes per category page.

Here’s a mock-up example:

future category page

What's Next?
Related Posts

This is a really helpful tip. I’m planning to do the same thing with my works gallery. Thanks!

Pola:

Well Done post, maybe the next theme goes customized with it.

Great tip, I’ve been toying around with different methods of doing the same thing with my portfolio.

Hey Craig - I check out your blog, nice Wordpress themes, subscribed!

[…] Using Custom Fields for different reasons […]

it’s a very good idea. you are a genius sp!

nice tut ,
can this be made in marqee style

Mosey:

Thank you for this! Whilst theundersigned.net does give a good intro to custom fields, it doesn’t really show how it can be applied to RL scenarios, so I find this particularly helpful! :) I’ve really wanted to use custom fields but was really not sure how to organise them, so I’m going to try it this time round!

No problem, thanks for dropping by.

Mosey:

One of my favourite new plugins: http://rhymedcode.net/projects/custom-write-panel

As mentioned before, I’m finding your guide particularly useful when applying it to displaying customfields generated by Custom Write Panel! :)

[…] One Way To Use Custom Fields @ Wpdesigner by Small […]

Excellent article SP. I’m going to have to give it a try :).

Thanks for sharing!

-Jonathan

[…] One Way To Use Custom Fields […]

[…] Custom fields - Para los usuarios de wordpress siempre se preguntaron para que sirven los custom fields (yo soy […]

Great article. I’ve been using custom fields for a long time but you had some good tips for using them in ways I hadn’t yet considered.

One of the problems I’ve run into is that custom fields don’t show in the RSS feed. I’m using them to provide some structured content that is part of the post and should appear in the feed.

Anyone have an easy way to deal with that?

[…] First, you need know how to use custom fields. […]

[…] 第一,你需要知道怎么使用自定义字段 (custom fields)。 […]

Good tutorial, takes you “by the hand”. Really appreciated.

how to show the new post in some categories or the father cotegories? thanks

What do you mean?

Yeah i also use custom fields and would love to be able to add them to my rss feed as well.

Does anyone out there know how to accomplish this?

Thanks

Great post by the way. It helped me a bunch.

[…] que leyendo WPDesigner, este interesantísimo blog de desarrollo en WordPress, encontré éste artículo, encontré el código perfecto para lo que queremos […]

[…] que leyendo WPDesigner, este interesantísimo blog de desarrollo en WordPress, encontré éste artículo, encontré el código perfecto para lo que queremos lograr. Si queremos crear lo antes […]

It’s very useful!
I will try it in my own site.

thanks

Ara Abcarians:

Hey! great little tut but i cant seem to get it to work right…
it works but it displays 3 posts 3 times each…. probably because i dont know exactly how to insert your source code correctly…. if you have the time can you show an example of how you would stick that source code into the index page?

interesting post thx

good site dude

[…] One Way To Use Custom Fields - Using Wordpress custom fields. […]

lAtAXw f76fgb6gb0nb07r70xngm7bx

oyINdl nice site! http://gov.com

[…] via Custom Fields Silke Schümann wrote this 05:19:Nach ein wenig try&error und mit der Hilfe einer Vorlage habe ich nun auf Franchie.de eine kleine Galerie in der Sidebar, die die jüngsten sechs […]

[…] One Way To Use Custom Fields ?????WordPress ?????????? […]

Best Site Good Work teenmodels 44921

Thanks for the tutorial… custom fields are definitely can be confusing.

Gloomy tales bigblacktits ryaii

Best Site Good Work dirty dancing tickets toronto :-)))

Andy:

Hi Guys,
we are running an “Article Writing Contest”
$600 worth prizes to give away.
Please check the link below to participate in the contest …

http://blogs.qualitybusinesslinks.com/

Just 1 article and you can win $$$
We hope to see your article entries soon ..
Good Luck.
-Andy

good material thanks free airline ticket :PP

Cool site goodluck :) web tickets =]]]

cheap tickets to new york dsyoun

very best job Stuhrling Watches mxzzyh

This site is crazy :) competitive term life insurance %[

Aphrodisiacs:

love the site
typepad

Wonderfull great site dicksuckers :[[

Cool site goodluck :) free ring tones =))

It’s funny goodluck animalporn bckveq

Excellent work, Nice Design preteenupskirt 121626

this is be cool 8) “><

mpmexn

Best Site good looking <a href=” videos “>teencleavage epwvy

Very funny pictures amaturesex toagzx

It’s funny goodluck <a href=” ilia “>nakedoldies 4099

“???????”?????????????????????????????????????,?????????????????????????????????????

Reply
Comment Policy
  • Theme support questions should be posted at the support forums.
  • Name and Email are required. Email is never published.
  • You grant this site perpetual license to reproduce your words and name/website in attribution.
  • Inappropriate comments will be removed at my discretion.
Close
Powered by ShareThis