WordPress.org

Support

Support » Plugins and Hacks » Custom Fields

Custom Fields

  • I know this has been oft discussed, but I still have NO idea how to do this. None of the instructions have been dumbed down enough for me. 🙂

    Could someone VERY VERY simply explain where to go/what to do?

    As of now, the best I can figure is that I have to edit each & every entry in order to make custom fields and even then, they don’t show up.

    Help, please?

Viewing 15 replies - 1 through 15 (of 47 total)
  • The editing part is pretty much an individual affair, since what you place in the custom fields is up to you. If you’re having issues here, provide some details into what you’re using them for.

    As for how to display it:

    A very general way:
    http://codex.wordpress.org/Template_Tags/the_meta

    Some control over the process:
    http://www.coffee2code.com/archives/2004/06/30/plugin-get-custom/
    http://software.vtpaintball.net/wordpress/customMetaDisplay.php

    Unfortunately, that’s all …Chinese to me. I just do not understand it.

    As I can’t even write Chinese…ok, maybe a little Mandarin. :)

    Since your blog has been customized, I’ll assume you have some knowledge with editing your WordPress template file(s). So to the point:

    Using the the_meta() tag (first link above), you insert something like the following — wherever you want the data from the custom fields to display — within The Loop found in your index.php template:

    <?php the_meta(); ?>

    This would output a simple unordered list of every “Key: Value” custom, or meta, field associated with a post. If your intent is to use custom fields to associate key words with a post, or provide an information marker to things like mood or calorie intake or whatever, then the built-in the_meta() tag may be all you need. However, a basic list of a post’s custom fields is not what everyone is looking for, hence the two additional links leading to plugins that give you more control over how to use and display them.

    If you need more info, you’ll have to help out a bit in return and fill us in on what you want to do with custom fields.

    Wow, still don’t get it.

    Basically, I want things like a field for what I’m listening to on iTunes, eating, wearing, doing, reading, that sort of stuff.

    I honestly do not have any (ANY) clue what a meta this and other stuff are/is.

    I’m also losing patience. Forgive if I sound short.

    One good point about the forums is, sound doesn’t travel over them very well…

    When I say meta, meta data, or post meta (how it’s referred to in WPland) just think “anything I enter in my custom fields”. It’s considered meta in a narrow sense, but that sense means: what you enter in custom fields can be anything you want. You choose what they are, decide what they represent, control how they’re used.

    Meta. Custom fields. For this little discussion, they mean exactly the same thing.

    Being that what you enter in custom fields can be anything, this makes them harder to use than if there was a few buttons to press and your current playlist or library holdings displayed on your blog. Part of the reason for this is, not everyone uses the data in custom fields for displaying information. The only real limit to their use is, each custom field entry is tied to a specific post.

    Now, a key question I think will cut through some of the confusion: Do custom fields fulfill what you’re looking to do? What I mean is, do you need to relate those things with a specific post? If there’s a historical purpose, such as keeping track of when you were listening to a song or reading a certain book, perhaps it does. If not, then maybe something outside of the standard WordPress toolset may be in order. Something like this plugin:

    http://www.matt.blis.co.uk/archives/2004/12/02/mystuff-plugin-02-released/

    To simplify:
    place this code: <?php the_meta(); ?> in your index.php template somewhere in the “entry” section and then when you create a new post with a key of “Listening To” value of “The Tragically Hip” it will show up in your post.
    The key of “Listening To” will now be saved as part of your post and could someday be used in the future.

    There is a lot more that can be done with this but this is it in its basic form.

    But how do I go about changing those values? If I put a “Listening To:” code in, I’m not listening to the same song each entry. How do I change the song?

    When you make your first custom field for a post (pick a post, any post) the *key* (i.e. “Listening”, “Reading”,…) will be stored for future use. The *value* (i.e. “Britney Spears”, “WP documentation”,…) of the custom field will be stored only for that chosen post thus you’ll have to enter a value (if you want) for each post.

    So in the normal entry mode there will be a place for me to write in whatever it is I want? Or do I have to do an Advanced Edit for every entry?

    (thank you again, I’m veeeeeeeery php illiterate)

    Also, the MyStuff plugin doesn’t work for me; it says the files don’t exist (I put them where they needed to go).

    In 1.5-beta-1 the custom fields are advanced editing as they seem to be in 1.2, too. So yes, you’d have to do Advanced Edit every time. But do change your setting at “Options > Writing > When starting a post, show:” to “Advanced controls”, all the fun stuff is there anyway 🙂

    I’ve also had problems with MyStuff and gave up on them so I can’t help you with that one.

    There is a custom field dealie at the bottom now. Do I just need to put in a code to make it/them show up on the index or is there more to be done?

    Also, how do I upgrade without having to uninstall/reinstall? (sorry sorrysorry!!!)

    I think that <?php the_meta(); ?> is the tag to use to get the custom fields showing. If you don’t want to show all custom fields (some plugins make their own additions that aren’t supposed to show) you should check out Get Custom Field Values plugin to pick out the fields you want.

    There’re upgrading instructions in the WP readme (come with the zip file) but I’m pretty sure someone has written better instructions telling one should remove all the files first. I actually upgraded by leaving only wp-config.php (database information) behind and uploading everything else but I’m not sure if that’s the right way to go. Someone more informed can help you with that.

    Great, thank you so much, Minna.

    So each time I want to put in a field, I write both the name of the field AND what goes in it. Am I correct?

Viewing 15 replies - 1 through 15 (of 47 total)
  • The topic ‘Custom Fields’ is closed to new replies.
Skip to toolbar