Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @koenbrouwer,

    I’m afraid, this seems more of a bug which’ll be resolved in the future update. In the mean while could you please this snippet and see whether it works?

    https://gist.github.com/wpmudev-sls/9f1a22896e7318dd26d06872b8467419

    The above snippet requires some?changes, you’ll need to update the code with the Form ID and with custom field.

    Thats, the following line in the given code:

    $form_ids = array( 4126, 2910 ); //Please change form IDs to your form?IDs

    You’ll need to set it to your form ID(s); a form ID is the same number that you see in the form?shortcode.

    You’ll also need to update the custom field ie the following line in the given snippet:

    if ( $post_val['key'] == 'test_image' ) { //Please change test_image to your custom field name

    You’ll need to replace the?test_image?with the name of your custom field (the one to which the URL of the uploaded file should be?added/mapped).

    The snippet can be implemented as a mu-plugins. Please check this link on how to implement the above code as a mu-plugins:
    https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins

    Please do let us know how that goes.

    Best Regards,

    Nithin

    Thread Starter koenbrouwer

    (@koenbrouwer)

    Works very well! Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Image uploaded, but not appearing on backend CPT custom field’ is closed to new replies.