Skip to content

Archives Widget and WPML not work #8

@sakrow

Description

@sakrow

Hi, i installed the plugin and when y select "Archives Widget" from one CPT that have a traslations with WPML, not appear any archive.

This is because in the JOIN query the table "icl" of WPML have "post_post" and now WPML save as "post_name-of-cpt"

That works if file "widget-custom-post-type-archive.php" modifies the line 216 to add:

if(strpos($query, 'post_post') !== false){
    $query = str_replace('post_post', "post_{$posttype}", $query);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions