Home Forums Backend Issues (wp-admin) Where are the custom fields in database?


Where are the custom fields in database?

  • Hi,

    I added two different custom fields for pages, posts, tags and categories. I can see them on wp-admin, edit them and use them in different parts of the code.

    The problem is when I want to update them directly from the database. I can find these two custom fields for pages and posts in the table “wp_postmeta”, but where are these two fields for categories and tags?

    Thank you so much,

  • If it’s not for a post, page or other post type then the values get stored in options table.

    for categories, tags and other taxonomies the option name will be

    “{$taxonomy_name)_{$term_id}_{$field_name}”, this is built the same way that you build the ID value to retrieve the value using get_field() or the_field() with the field name added to it.

    Options are similar except that the field name is pretended with “option_”

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.