Custom Fields
Re-Envisioned
Support General Problem with Featured Image Field

  • Creator
    Topic
  • #5992
    Resolved David
    Participant

    Hi,
    I added the field for the Featured Image using the ID _thumbnail_id and everything works properl. When I translate the post using the WMPL plugin, that Feauted Image field disappears completely from metabox.

    Default language post: https://tppr.me/1s75L
    Translated post: https://tppr.me/k7Ukn

    Do you have any idea of what might be causing the problem and how to solve it?

    Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #5994
    Jackky
    Participant

    That's because WPML made a unique new page for each translation, so you need to choose post metas twise.

    #5998
    Anh Tran
    Keymaster

    Thank you @Jackky for your help! That's correct.

    @David: Please take a look at media translation guide from WPML. Make sure you enable this feature. It allows using the same media files in content in different languages.

    #6045
    David
    Participant

    Hi Anh, and thanks Jackky for your help!
    I added the WPML Media plugin, but the field with "_thumbnail_id" is not yet displayed in the translated post. Any other suggestions?

    Thanks,
    D

    #6071
    Anh Tran
    Keymaster

    Hmm, does that work if you remove the field and use WordPress featured image instead?

    #29033

    Hi,
    I also have a problem with featured image field.
    I would like to display a default Featured Image if the Featured Image doesnt't exists.
    Is it possible to do that with MB Views ?
    I mean, a way to do this :

    If Featured Image exists then ... else display <img src="{{ post.thumbnail.thumbnail.url }}

    thx for your precious help !
    Oliver

    #29046

    Oh I found the answer;)

    {% if post.thumbnail.full %}
        <img src="{{ post.thumbnail.full.url }}" />
    {% else %}
        <img src="https://via.placeholder.com/800x100" />
    {% endif %}
Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.