Hi
I tested your code in the functions.php, in a child theme and it works.
Where have you this code in your functions.php?
hi Chrystl.
well i dont really get what u mean (im new to wordpress stuff.. srry :d)
but in case u are asking just about location. its at the top of the page.
first i just put it there as it is. Then i put it in custom function(in case it wasnt called properly or dunno) and hooked it up to ‘after_setup_theme’ thing. That didnt work either.
Btw im using Avada theme. :/
Oh ill take opportunity and ask u one more thing if i may. im just trying to translate stuff of html elements in my custom template. its something like this:
`<span>Post type :</span> <span><?php the_title(); ?> </span>
so is registering those things the right way to go about it? i kind of didnt feel like editing po and mo files. and this seemed like easier solution :3
forgive me for my noobness :d
Then i put it in custom function(in case it wasnt called properly or dunno) and hooked it up to ‘after_setup_theme’ thing.
Could you provide your code, please?
sure here it is
add_action( 'after_setup_theme','register_custom_string');
function register_custom_string(){
pll_register_string('tour-display','Tour type');
}
I have just tested your code, and it works perfectly.
Could test your code with a Twenty Sixteen child theme? Does it work?
yes it works in twenty sixteen :/
so is it Avada’s fault? :/
so i put the code in Avada parent theme functions.php and it works.
how can i make it work in Avada child theme? :/
so i hooked it to ‘init’ action and now it works fine. thanks for taking ur time anyways
Great. Could you mark your topic as “resolved”? Thanks.