Problem with Featured Image Field

Support General Problem with Featured Image FieldResolved

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #5992
    DavidDavid
    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!

    #5994
    JackkyJackky
    Participant

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

    #5998
    Anh TranAnh 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
    DavidDavid
    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 TranAnh Tran
    Keymaster

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

    #29033
    philippe@studiocassette.com[email protected]
    Participant

    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
    philippe@studiocassette.com[email protected]
    Participant

    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 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.