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

    (@peter-westerlund)

    Okay not sync comments. Just show the comments from all language siblings in their posts?

    Please, how?

    Thread Starter Peter Westerlund

    (@peter-westerlund)

    Okay, I’m starting to get this working with this princip:

    <?php
    $comments = get_comments(array('post_id' => pll_get_post($post_id, $slug), 'status' => 'approve', 'lang' => array('en', 'sv', 'de')));
    ?>
    <?php
    wp_list_comments(array(
    'callback' => 'mytheme_comment'
    ), $comments);
    ?>

    But I get these error messages:

    Warning: Illegal offset type in isset or empty in /nfs/c07/h03/mnt/XXXXXX/domains/example.com/html/wp-content/plugins/polylang/include/model.php on line 237

    Warning: Illegal offset type in isset or empty in /nfs/c07/h03/mnt/XXXXXX/domains/example.com/html/wp-content/plugins/polylang/include/model.php on line 245

    Edit: Okay, this was the solution: 'lang' => 'en,sv,de'

    Edit: Okay it’s still not working… because the comments shows up on all articles. Not just the language siblings. Completely different posts as well..

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sync comments?’ is closed to new replies.