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.