@takayukister @mikylucky Hey guys, I came across this support question when I ran into something similar myself and was wondering if you could detail this a bit as I’m not sure I understood how you solved it.
So I’m using a theme that has at least a couple CPTs (I only need 2 of these to be available in another language) and I’m also using woocommerce.
If my understanding is correct, I’d have to use in the functions.php of the theme and somewhere (to be determined). How would this code need to be adapted to work for multiple CPTs since this is for just one.
add_filter( 'bogo_localizable_post_types', 'custom_bogo_localizable_post_types' );
function custom_bogo_localizable_post_types( $post_types ) {
$post_types[] = 'your_cpt_name';
return $post_types;
}
Would this work?
add_filter( 'bogo_localizable_post_types', 'custom_bogo_localizable_post_types' );
function custom_bogo_localizable_post_types( $post_types ) {
$post_types[] = 'your_cpt_name1';
$post_types[] = 'your_cpt_name2';
$post_types[] = 'your_cpt_name3';
return $post_types;
}
$post_types[] would be an array of the 3 names given?
Thank you!
-
This reply was modified 8 years, 1 month ago by
orangeworx.
-
This reply was modified 8 years, 1 month ago by
orangeworx. Reason: corrected code
-
This reply was modified 8 years, 1 month ago by
orangeworx. Reason: Corrected