Support » Fixing WordPress » Custom Post Type – Attachment

  • On this page http://codex.wordpress.org/Custom_Post_Types is describes a custom post type called an “Attachment” and is described as “a special post that holds information about files uploaded through the Media upload system. They hold all the description and name and other information about uploaded files.”

    How do I make one of these? Or is it just a normal post with media added to it? What I want is the ability to upload a file and have the file itself be the post content, and add meta or other stuff if I want. (ie. podcast).

Viewing 4 replies - 1 through 4 (of 4 total)
  • An attachment is an image, document or other media type that you’ve uploaded to your site via the Add Media options.

    Thread Starter Brenderous

    (@brenderous)

    What you say, and what the Custom Post Types page says, don’t seem to match up.

    But I’m more inclined to agree with you. I don’t see any way to have media-based custom post.

    Thread Starter Brenderous

    (@brenderous)

    Ok here’s a better question.

    Is there a list of the parameters you can put in the “supports” array for the “register_post_type” function.

    For example:

    ‘supports’ => array(‘title’, ‘editor’, ‘author’, ‘thumbnail’, ‘audio’, ‘video’, ‘pdf’)

    EDIT: ah, here it is: http://codex.wordpress.org/Function_Reference/register_post_type

    Still not what I’m looking for, though:(

    I have a related question.

    I am interested in making a custom post type that i feel mostly is based off an ‘attachment’ as opposed to a post. So I would like to include the capabilities of an ‘attachment’ as a base and then be able to add a taxonomy to extend the type.

    I would then like to use a Page to display a list of all of these custom posts divided by that taxonomy.

    The documentation leads me to believe that this can be done by setting ‘capability-type’ to ‘attachment’ when it says that it uses this argument to construct capabilities.

    Documentation

    capability_type
    (string) (optional) The post type to use for checking read, edit, and delete capabilities.
    Default: "post"
    By default the capability_type is used to construct capabilities.

    Does anyone know if this is possible?

    Also, how would it show up in the Admin UI?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom Post Type – Attachment’ is closed to new replies.