Title: pll_register_string doesnt work
Last modified: August 31, 2016

---

# pll_register_string doesnt work

 *  Resolved [twasadream](https://wordpress.org/support/users/twasadream/)
 * (@twasadream)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/pll_register_string-doesnt-work/)
 * so it just doesnt work. im using in my child theme functions.php file.
    and nothing
   shows up in the “String Translations” tab.
 * `pll_register_string('post-display','Post type');`
 * [https://wordpress.org/plugins/polylang/](https://wordpress.org/plugins/polylang/)

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

 *  Plugin Support [Chrystl](https://wordpress.org/support/users/chrystl/)
 * (@chrystl)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/pll_register_string-doesnt-work/#post-7020788)
 * 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](https://wordpress.org/support/users/twasadream/)
 * (@twasadream)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/pll_register_string-doesnt-work/#post-7020796)
 * 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](https://wordpress.org/support/users/chrystl/)
 * (@chrystl)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/pll_register_string-doesnt-work/#post-7020798)
 * > 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](https://wordpress.org/support/users/twasadream/)
 * (@twasadream)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/pll_register_string-doesnt-work/#post-7020799)
 * 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](https://wordpress.org/support/users/chrystl/)
 * (@chrystl)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/pll_register_string-doesnt-work/#post-7020800)
 * 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](https://wordpress.org/support/users/twasadream/)
 * (@twasadream)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/pll_register_string-doesnt-work/#post-7020807)
 * yes it works in twenty sixteen :/
    so is it Avada’s fault? :/
 *  Thread Starter [twasadream](https://wordpress.org/support/users/twasadream/)
 * (@twasadream)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/pll_register_string-doesnt-work/#post-7020810)
 * 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](https://wordpress.org/support/users/twasadream/)
 * (@twasadream)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/pll_register_string-doesnt-work/#post-7020811)
 * so i hooked it to ‘init’ action and now it works fine. thanks for taking ur time
   anyways
 *  Plugin Support [Chrystl](https://wordpress.org/support/users/chrystl/)
 * (@chrystl)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/pll_register_string-doesnt-work/#post-7020831)
 * 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.

 * ![](https://ps.w.org/polylang/assets/icon-256x256.png?rev=3433336)
 * [Polylang](https://wordpress.org/plugins/polylang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/polylang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/polylang/)
 * [Active Topics](https://wordpress.org/support/plugin/polylang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/polylang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/polylang/reviews/)

## Tags

 * [pll_register_string](https://wordpress.org/support/topic-tag/pll_register_string/)

 * 9 replies
 * 2 participants
 * Last reply from: [Chrystl](https://wordpress.org/support/users/chrystl/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/pll_register_string-doesnt-work/#post-7020831)
 * Status: resolved