• Resolved alsur

    (@alsur)


    Hi. Trying to implement a simple FAQ with Pods. Not using Pods templates at the moment so just a modified query to display the content via our theme.

    All worked correctly till we started including content in different languages via our WPML plugin. For some unknown reason, we get mixed content! CPT in Spanish appear in English and vice versa. Only happening with the new Pods CPT for FAQ, post and pages have been working correctly with WPML for years.

    Our only change in code is modifying the query which I understand should not affect:

    <?php
    $posts = get_posts([
    ‘post_type’ => ‘faq’,
    ‘post_status’ => ‘publish’,
    ‘numberposts’ => -1,
    ‘meta_key’ => ‘order’,
    ‘orderby’ => [‘meta_value_num’,’modified’],
    ‘order’ => ‘DESC’
    ]);
    ?>

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @alsur

    What are your WPML settings for this post type?

    Cheers, Jory

    Thread Starter alsur

    (@alsur)

    Thanks for prompt reply.

    Settings are correct. We just figured out that our get_posts() required a

    'suppress_filters' => false

    to work. Somehow without it WPML support for languages behaves weirdly.

    • This reply was modified 2 years, 2 months ago by alsur.
    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @alsur

    That sounds logical as WPML uses filters to modify the returned posts.
    If you suppress them it won’t work correctly ??

    Cheers, Jory

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Pods compatible with WPML?’ is closed to new replies.