Custom post type help (5 posts)

  1. d10gen3
    Posted 4 years ago #

    I'm working on a website for a designer and he needs to publish his portfolio. I created a custom post type called portfolio in which every single item in the portfolio is called a project. Ok, the problem is that i don't want to put the usual fields that i usually have in a post (excerpt, post content, etc.), what i want is to have the following fields shown when he clicks the add new button:

    - Image
    - URL
    - Description

    I don't have a problem with the description and the URL, as they are simple custom fields, but the image upload is the one that i can't find a way to create.

    In my $args variable i have:
    'capability_type' => 'post',
    Is there a way to tell that my custom post type is based on attachment instead of post?, but behaves as a post, so he can upload the file and the custom fields refer to that specific attachment?

    Thanks in advance for your help!

  2. Felix
    Posted 4 years ago #

    You could use the built-in featured image functionality for your image field, or the Advanced Custom Fields plugin.

  3. d10gen3
    Posted 4 years ago #

    Ok, how do i use that image field? I want it to be in the center section where the admin can see it, i like the idea but when i activate the

    'supports' => array( 'thumbnail' )

    It adds a box with the title 'featured image' way below in the right side bar (below the publish and taxonomy boxes)... and i want it to appear in the top part right in the middle. And I also want to change the box title to 'Project screenshot'.

  4. scormeny
    Posted 4 years ago #

    I also would put in a vote for YAPB (Yet Another Photo Blog Plugin) from Yoast, which is an awesome photo-attachment plugin that I adore. I suggest you try it out. In my experience, YAPB works with ALL posts, I don't know how it would work with Custom Post Types. It is a great plugin for portfolio-type sites.

    YAPB plugin page

  5. d10gen3
    Posted 4 years ago #

    Thanks for your suggestion, but this is not really what i want to do. It would be really nice if my intention was to create a beautiful portfolio for my website, but right now all i need to do is show a form to my administrator with the fields that i want:
    - A space to upload the image (which i would gladly do with the built in feature of wordpress if i can adjust it to my desire)
    - And a few custom fields that the administrator needs to fill up.

    Right now everything is working perfect, all i need is to put the image uploader in the content area instead of the sidebar and personalise it's text and title.

    But I did check the plugin and it is really good!

Topic Closed

This topic has been closed to new replies.

About this Topic