Support » Plugin: Meta Box » Video & Multiple Field Type

  • Resolved learnwpclub



    I have a theme with custom post type: Portfolio, where registered users can add their info, photos and videos. They are using Meta Box for that.

    The Videos field is defined as:
    ‘name’ => __(‘Custom Video Iframe’,’example’),
    ‘desc’ => ”,
    ‘id’ => $prefix . ‘pf_custom_video_urls’,
    ‘type’ => ‘textarea’,
    ‘clone’ => true

    When people add the youtube embed code or the URL, it displays a video on their profile.

    1st question: How can I change or add the ability to upload video directly using that field? I changed the type from textarea to video, but nothing happened. How can I change that so users can upload a video?

    2nd question Is it possible for that same field to have different types? like textarea, oembed and video? so users can either enter the URL of the video or upload it?

    finally, will that be easier to do with the builder or other extension?
    they are on my shopping list, but for now I need a free solution if possible.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Tran Ngoc Tuan Anh



    1st question: To allow users upload video directly to the field, you have to use a new field type video (available in Meta Box 4.10). This field is similar to image_advanced field, but used for uploading videos.

    There’s no way to change a textarea field to video field. Instead of that, you can offer users 2 fields: 1 for enter embed code (iframe or URL) and 1 for uploading video. And then in the frontend, depends on what content available, show it.

    2nd question: There’s no way to use 1 field to store different types of content (textarea is made for text, while oembed is for embed media and video is for uploading video). As I suggested, you might want to have more fields to offer users more options.

    3rd question: Whatever you can do with code, you can do with the Builder extension. The Builder extension is helpful when you want a GUI for the job and when you need to change something (like after 3 months, you need to get back to the project) without touching code.

    Thanks, I will try that.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Video & Multiple Field Type’ is closed to new replies.