Wordpress custom fields?

Soldato
Joined
27 Oct 2002
Posts
3,540
Location
At the fulcrum of humdrum
I'm currently making up my portfolio in WP; it's the first time I've ever used it, and on the whole I'm impressed by its flexibility.

But I've got a problem.

The way I've set it up is that each item in my portfolio is a post. I want to have two fields - "Client" and "Year of creation" - display with every post.

Ah, custom fields look like just the thing, I thought. But they're incredibly frustrating to implement - not only am I finding the code behind them obtuse, but they're also sometimes not displaying in the same order each time.

For example, most posts will display like so:

Client: In-house
Year: 2009


But every so often, for reasons I haven't fathomed yet, it'll display:

Year: 2009
Client: Hyperglobalmegacorp


So my questions are: are custom fields the best way to do this in the first place? And if so, how can I force the order?

Also, I want to sort the display of all posts in index.php by "Year of creation" by default. I'm stumped on this one, too. Any pointers?

Ta for any advice :)
 
Last edited:
Okay, I've found a way of querying custom fields individually without using the_meta, so I've cracked the first part of my problem :)

However, if you've got any tips on displaying all posts in "Year" order, I'm all ears. Um, eyes. :D
 
Back
Top Bottom