custom-post-type-widgets icon indicating copy to clipboard operation
custom-post-type-widgets copied to clipboard

Archives Widget and WPML not work

Open sakrow opened this issue 9 years ago • 4 comments

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);
}

sakrow avatar Mar 14 '16 15:03 sakrow

Hello, @sakrow I am getting same issue with Archives Widget and WPML. I check the code file "widget-custom-post-type-archive.php" to modifies the line 216 to add your code. but I was unble to find it. can you please help me with the solution thank!

bhushanbobade20 avatar Dec 13 '18 06:12 bhushanbobade20

Hello, @sakrow I am getting same issue with Archives Widget and WPML. I check the code file "widget-custom-post-type-archive.php" to modifies the line 216 to add your code. but I was unble to find it. can you please help me with the solution thank!

Sorry, but i think that file was changed after my response.

This "plugin" is now non maintained and i don't remember the changes (why and where).

Please search for other maintained one.

Sorry for my poor response.

sakrow avatar Dec 28 '18 20:12 sakrow

@sakrow thanks for the reply. I will look into alternate ways to fix it.

bhushanbobade20 avatar Dec 31 '18 09:12 bhushanbobade20

Hello @thingsym , Thanks for this wonderful plugin. The only issue I have when you select “Archives Widget” from one CPT that have a translations with WPML, not appear any archive. Will you please give the solution as soon as possible. It will be really helpful. Thanks!

bhushanbobade20 avatar Dec 31 '18 09:12 bhushanbobade20