There is a plugin that let’s me upload a title, description and image with a form.

If you send it, it creates and automatic post with the title, description and the image.

The code for showing the image is:

if ( has_post_thumbnail() && is_single() ) { 
    $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large' );
    <div class="attachments">
        <p class="image-caption"> <?php _e('Ingezonden video:','feature-request'); ?> </p>
        <figure class="avfr-image post-image">
            echo '<a rel="lightbox" href="' . $large_image_url[0] . '" title="' . the_title_attribute( 'echo=0' ) . '">';
            the_post_thumbnail( 'thumbnail' );
            echo '</a>';

I would like to rewrite the code so that I can upload a video and it automaticly posts the video , just like the image.

Can somebody help me with the code?

1 Answer 1


Video from video clud, like youtube.com, vimeo? If true - use text field or textarea field. User fill youtube share code in this field and you will add this to post_content. Or create custom iframe and tell users insert video link.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.