WordPress.org

Ready to get started?Download WordPress

Forums

register_taxonomy 'mediapage' (4 posts)

  1. Goran Kosutic
    Member
    Posted 2 years ago #

    Hi,

    I was trying to register a taxonomy for the Media page and checking the register_taxonomy function in the codex, I found this:

    WordPress builtin post types:

    post
    page
    mediapage
    attachment
    revision
    nav_menu_item

    I thought using 'mediapage' as the second argument of the register_taxonomy function ($object_type) would put my taxonomy under the Media item in the menu, but no.

    I guess I can register this taxonomy anyway and add some custom fields to the media upload page, but if this can somehow work automatically I'd like to know. I'd prefer to use the normal WordPress category select box instead of building my own for instance.

    Further more, I found no mention of 'mediapage' anywhere in the files, so I don't know how this can be a builtin post type.

    If anyone has a clue, I'd appreciate it.

  2. maxxsnake
    Member
    Posted 2 years ago #

    This was giving me trouble, too, until I caught later in the documentation it says

    _builtin
    (boolean) (not for general use) Whether this post type is a native or "built-in" post_type. Note: this Codex entry is for documentation - core developers recommend you don't use this when registering your own post type
    Default: false
    'false' - default this is a custom post type
    'true' - this is a built-in native post type (post, page, attachment, revision, nav_menu_item)
    Note that they're now calling it an 'attachment' instead of 'mediapage' - in my example making the switch took care of business as needed.

  3. Fab1en
    Member
    Posted 2 years ago #

    Any update on this topic ?
    I think it's a documentation bug : the 'mediapage' post type does not exist in the core (at least in version 3.3), and 'attachment' is already mentioned in the list of builtin post types.

  4. Fab1en
    Member
    Posted 2 years ago #

    I removed it from the documentation.
    Please post here or send me a message if I made a mistake.

Topic Closed

This topic has been closed to new replies.

About this Topic