Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Chrystl

    (@chrystl)

    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?

    Thread Starter twasadream

    (@twasadream)

    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

    Plugin Support Chrystl

    (@chrystl)

    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?

    Thread Starter twasadream

    (@twasadream)

    sure here it is

    add_action( 'after_setup_theme','register_custom_string');
     function register_custom_string(){
       pll_register_string('tour-display','Tour type');
     }

    Plugin Support Chrystl

    (@chrystl)

    I have just tested your code, and it works perfectly.

    Could test your code with a Twenty Sixteen child theme? Does it work?

    Thread Starter twasadream

    (@twasadream)

    yes it works in twenty sixteen :/
    so is it Avada’s fault? :/

    Thread Starter twasadream

    (@twasadream)

    so i put the code in Avada parent theme functions.php and it works.
    how can i make it work in Avada child theme? :/

    Thread Starter twasadream

    (@twasadream)

    so i hooked it to ‘init’ action and now it works fine. thanks for taking ur time anyways

    Plugin Support Chrystl

    (@chrystl)

    Great. Could you mark your topic as “resolved”? Thanks.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘pll_register_string doesnt work’ is closed to new replies.