Post field with post_type page and wpml

Support General Post field with post_type page and wpml

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5350
    weseoweseo
    Participant

    Hello, i have a normal post field with the post_type "page".
    I also use wpml in my website.

    When i have saved the post (or option page) with a page value, all works fine and the page is preselected.
    Now when i change the backend language in wmpl, the post select field cant find the preselected page and the value will be changed to an empty string.

    How can i prevent this problem?

    Thank you very much

    #5362
    Anh TranAnh Tran
    Keymaster

    Hi, you probably need to translate all posts into another language. WPML auto changes the query to include only posts in the current language.

    #5363
    weseoweseo
    Participant

    "WPML auto changes the query to include only posts in the current language."
    This is the problem, all posts are translate.
    But the option page can only save one page value.

    When i save a german page value and i switch to the english backend (in wpml).
    The select box can't find the value, because the page id is not available.

    #5370
    Anh TranAnh Tran
    Keymaster

    I got it. Looks like the ID of the English version is not translated into the ID of the German version. I got help from WPML team to add this feature in the previous version. I will check it now.

    In the worst case, I think a solution for this might be using 2 fields: 1 for English and 1 for German, and in the frontend you can use a condition to get the correct field.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.