Home Forums ACF PRO showing the Field Type upload image on the vendor page Reply To: showing the Field Type upload image on the vendor page

  • @shahbazi It may be a language barrier thing, but your question is kind of difficult to understand what you are asking. When you say you want to show part of the image on the vendor page so that the seller can upload the image there. That doesn’t make any sense to me. What is part of the image? And how would displaying an image allow a user to upload an image?

    Are you asking if you can use ACF to place an image upload button on the front end? I personally have never seen that done before, but can’t say for sure whether it’s possible or not. From what I understand, ACF itself won’t display an image upload field on the front end, only on a post edit screen, from which you can then display the image in your page template using something like:

    // get image field return value from post edit screen
    $image = get_field('vendor_image');
    <!-- If return type is array -->
    <img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
    <!-- If return type is URL -->
    <img src="<?php echo $image; ?>" alt="hardcoded alt text description" />

    If you’re wanting to give users the ability to upload images on the front end, you will most likely need to code this manually, using <input type=”file”> form control and then handling the storing/access of the image with php or js. Or perhaps you can find another plugin to do this for you, but I’ve never heard of ACF being used for something like that. Then again, I could be totally misunderstanding what you are asking.