- This topic has 2 replies, 2 voices, and was last updated 4 years, 5 months ago by .
- You must be logged in to reply to this topic.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
I've created custom post type in functions.php into Mai Lifestyle Pro theme folder, and I want to translate them. I've installed Loco Translate but when I select the theme to translate only shows 4 strings, doesn't display CPT strings.
I've added this to de style.css header:
Text Domain: aktion-aventura
This in functions.php:
add_action( 'after_setup_theme', 'aktion_aventura_child_localization' );
load_child_theme_textdomain( 'aktion-aventura', get_stylesheet_directory() . '/languages' );
What more I have to do to translate this custom post type strings?
Thank you very much!
Hi there, I haven’t personally used Loco Translate but you need to make sure the strings in the CPT code are translateable, and use a text-domain that Loco Translate will pick up.
Also, I don’t think the theme is where your CPT code should go either. You’re safer putting that code in a plugin.
Lead developer of Mai Theme
Ok JiveDig, I will try it that way.
© 2023 WPEngine, Inc.