• Resolved oscb

    (@oscb)


    Hi there,

    I don’t usually post anything since I find the solutions in similar Topics here but I haven’t found anything about this yet and it’s driving my client nuts (not me, actually).

    Apparently when I select a picture I upload as a featured image WordPress won’t do anything it just displays a -1 in the Featured Image Box (it’s in spanish but is actually the same) see pic:
    https://cl.ly/3b0G3l211K3q3o2x3Y2I

    When i try to obtain the image using the function get_post_thumbnail it won’t get it. The image is uploaded and everything is ok but apparently it just won’t work.

    By now I’ve tried replacing the WordPress files (reuploading WordPress) and deactivating all plug ins as well as trying to use it on different post types (currently there are 2 as well as normal posts) with no luck.

    Any of you has an idea about it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter oscb

    (@oscb)

    Problem solved. I will explain why it happened and how to solve it if you find yourself in the same trouble:

    I was using this framework for taxonomy metadada. Even though it is an awesome code, it has a function that causes trouble: check_field_wysiwyg()

    The thing is that it is enqueueing jQuery everywhere it finds a WYSIWYG textarea and that includes the “Add Post” area. This causes trouble passing the ID of the images to the Featured Image Area on WP, so it saves just “-1”.
    Just comment the wp_enqueue_script(‘jquery’); line on the code and everything should be going on just OK!

    can you explain how to do this please?

    i dont understand what you mean

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Featured Image Error -1’ is closed to new replies.