WordPress.org

Ready to get started?Download WordPress

Forums

WPML comment merging
[resolved] seems buggy with custom post types (2 posts)

  1. Daniel Koskinen
    Member
    Posted 3 years ago #

    Hey!

    Trying out your otherwise wonderful plugin with translated custom post types. Unfortunately it doesn't seem to work with them, instead showing all comments from all posts. Any ideas how to fix it? In this case I wouldn't mind hard coding the name of the post type if it comes to that.

    http://wordpress.org/extend/plugins/wpml-comment-merging/

  2. Daniel Koskinen
    Member
    Posted 3 years ago #

    Actually I figured it out. You can support custom post types easily by changing lines 19 and 38 from this:
    $type = is_page($post_ID) ? 'page' : 'post';

    to this:

    $type = get_post_type($post_ID);

    After some brief testing with posts, pages and a custom post type I created, it seems to work just fine.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic