As you’re using _x()
as your translation function you should do one of the following.
1) If 'slug'
is supposed to be your text-domain, add context to the _x()
functions, e.g. _x( 'Homepage', 'page title', 'slug' )
.
2) If 'slug'
is your context, then add the text-domain, the third parameter, to your translation functions as the text strings you have don’t seem to be default texts and most likely won’t be found in the default text-domain.
3) Switch to using for example __()
or esc_html__()
translation function, which only needs string
and text-domain
as parameters.
Related Posts:
- How to create .pot files with POedit?
- When to use _e and __ for the translation?
- What is a Theme textdomain?
- pass object/JSON to wp_localize_script
- How to concatenate inside the _e() function the right way?
- What is the purpose of an extra file for translation?
- Make a custom theme translate-ready
- Change text of twentyseventeen_edit_link()
- Theme elements not translating
- Should we localize custom-made themes / plugins?
- Help with “text domain”, comments_form in WordPress theme
- Prevent WordPress updates from overriding custom language translations?
- Translation-readiness of Koi theme
- Some translations do not work in my template class
- My custom theme does not load the translations
- How to make the_tags title translatable?
- Internationalization and functions that use it
- Translation Issue with WordPress Theme Check in comment_form function
- Default string not appearing want to translate
- Should I change text-domain of TGM library inside theme?
- Single translation for many locales
- comment form args are not translatable (customized comment form)
- Set parent theme language with custom .mo files
- Does the textdomain have to be the theme’s name?
- Why set a second parameter in the translate function?
- Do translation functions like __e() have to take strings in English in themes?
- Translate a child theme with pure PHP and gettext
- Translate a theme with a PO file
- Cart displayed above header
- how to unlocalize theme/plugin?
- WordPress theme doesn’t read my translations from pt_BR.po file
- Menu names not getting translated
- Any way to permanently translate themes?
- Display Today’s date outside the loop?
- Why is wp_head() creating a top margin at the top of my theme header?
- What is $post_id? is it a global variable in WordPress?
- How to limit wordpress menu depth in admin panel
- How can I set image sizes and still have responsive images using the srcset attribute?
- Possible to “Attach” images to multiple posts without inserting or uploading twice?
- Remove settings if theme is deleted?
- Adding customizer styles with wp_add_inline_style
- Adding widgets programatically: how to avoid collisions?
- Registering Sidebars and Sidebar Widgets. Sidebar Widgets Not Displaying
- How do I get a parent theme modification from a child theme?
- Removing the default sidebar from admin panel
- How to display category specific post content on a page
- Is there any need to use both wp_reset_postdata and wp_reset_query together?
- how to pull wordpress post comments to a external page
- Enqueued Stylesheets Effecting Admin Styles
- Why is $GLOBALS[‘content_width’] needed if site is responsive?
- How i can get widgets areas working in customizer?
- Correctly using wp_head()
- Theme development question regarding layouts
- Cannot figure out how to overwrite files in child theme
- Using wp_tag_cloud(‘format=array’) to print tag names without links?
- Link to a .po file in a child theme
- My Admin bar covers my sticky navbar [closed]
- Responsive embed for the video shortcode
- Access theme options in templates
- How to show post from category select
- How to append to menu items selectively
- How remove render blocking css from wordpress when you build a theme?
- How to: JQuery multiple wordpress media uploader buttons in the same options page?
- Move default page templates to sub directory
- How to upload/update theme from local – bitbucket – shared hosting?
- Multi-page posts: A subdirectory for each post?
- Remove “You are using WordPress 3.2.1” from Right Now Dashboard Widget
- Load sidebar template just once to prevent multiple animations
- Change frontpage content via WordPress
- How to Have a Pure HTML Sub Directory In WP Site
- What are the critical theme files when building a custom theme?
- Linking beetween pages in wordpress
- Having issue with WordPress wp_enqueue_style
- search.php file not pointing where it should
- customize theme with get_template_part() [closed]
- Loading issue on Chrome for my WordPress theme
- Callback Function Not Firing On Selection In Media Uploader
- Filter didn’t work on content class (hybrid_post_attributes)
- Link to RSS feed not clickable?
- Exclude function from homepage only?
- Adding google fonts to WordPress theme
- Require once a general library
- 3 Level Menu Navigation (3rd Level not displaying)
- How to make menus, footer, sidebars multi language
- Unable to delete option
- overlay post title over post’s featured image
- Hook in parent theme Menu function
- How to add custom nav_menu_css_class to certain menu only?
- How to avoid Ajax in wordpress theme in making mulitple request?
- Import from HubSpot COS into WordPress 4?
- Any disadvandages if I style the wordpress align classes without img and .wp-caption prefix
- Simple loop with shortcode rendering problem
- Theme automatically inserting “more” tag on every post
- How get the 10 most viewed pages (not post)
- Conditional tags issue for multiple is_page() conditions in sidebar.php
- Allowed memory size of (…) exhausted
- have_posts() return false on single post
- Twenty sixteen – full height
- Feeds are showing where Post archive page should be
- I want to resize post featured image without cropping image. How?