WordPress.org

Forums

Add optional or default image to user post from form submission (1 post)

  1. jp389380
    Member
    Posted 3 years ago #

    Hello - I have a basic WP site that allows users to submit custom post types using a simple form.

    I would like my site to do two things.

    First, to give users the option to upload an image as part of their form submission and have that image appear on their post.

    Second, if the user does not upload an image, have a specific image that I have in my media library appear as a "default" image for that user's post.

    I want the default image to be driven by a required field that specifies the post category.

    So, as an example, if the post category is "baseball", and the user's custom post is about "home runs", I want them to be able to either upload their own image. If they do not upload their own image, the post would display a thumbnail of Babe Ruth for example by default (my image).

    Thanks in advance

Topic Closed

This topic has been closed to new replies.

About this Topic