I have created a folder called “languages” in my child theme directory and added a: da_DK.po and a da_DK.mo file generated using POedit. I have created a functions.php file in my child theme directory and added the following lines of code (as guided here: http://codex.wordpress.org/Child_Themes):


* Setup My Child Theme’s textdomain.
* Declare textdomain for this child theme.
* Translations can be filed in the /languages/ directory.
function my_child_theme_setup() {
load_child_theme_textdomain( ‘ifeaturepro5-child’, get_stylesheet_directory() . ‘/languages’ );
add_action( ‘after_setup_theme’, ‘my_child_theme_setup’ );

This causes two issues:

1. I cannot log into my wordpress admin area

2. Trying to add a comment front end causes an error or a blank page.

When deleting the custom functions.php file in the child theme directory everything turn back to normal.

What have I entered wrong in my custom functions.php file shown above?


You are using weird quotes:

load_child_theme_textdomain( ‘ifeaturepro5-child’, get_stylesheet_directory() . ‘/languages’ );
add_action( ‘after_setup_theme’, ‘my_child_theme_setup’ );

use this:

load_child_theme_textdomain( 'ifeaturepro5-child', get_stylesheet_directory() . '/languages' );
add_action( 'after_setup_theme', 'my_child_theme_setup' );
| improve this answer | |
  • functions.php doesn't have to start with particular header, theme's header is in style.css. – Rarst Jan 12 '14 at 12:08
  • @Rarst - You are right. I've updated my answer. – Manolo Jan 12 '14 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.