WordPress.org

Ready to get started?Download WordPress

Forums

Very Very Useful, Simple, and Effective (3 posts)

  1. blowski
    Member
    Posted 6 years ago #

    This should be part of the core code - I find it too complicated to access custom field values, but use them a lot to avoid having lots of unnecessary plugins.

  2. theapparatus
    Member
    Posted 6 years ago #

    Why not suggest it as a trac ticket?

    http://trac.wordpress.org

  3. Dgold
    Member
    Posted 5 years ago #

    I agree, basically. Calling in custom fields could be easier & have more options, and should be more obvious.

    Well, it already IS a part of the core code. It's just not quite as super-simple as it should be. But it IS in the code, and there is a template tag (or 2) that can handle the same thing. Namely,

    http://codex.wordpress.org/Using_Custom_Fields#Internal_Functions

    get_post_custom()
    Get all key/value data for the current post.
    get_post_custom_keys()
    Get a list of all key names for the current post.
    get_post_custom_values($key)
    Get the list of values for a particular key on the current post.
    get_post_meta($post_id, $key, $single = false)

Topic Closed

This topic has been closed to new replies.

About this Topic