• I want to give custom functions to the website and for this I have created a file where to paste these functions and call this file from the function.php file.
    In order not to affect the parent theme, in the created file, I must reference the text-domain of my child theme, but by default it is the same as the parent theme.
    How can I assign a text-domain to the child theme?
    I searched for information and found the official WordPress documentation on child themes, but I don’t know how to interpret it, it is very technical language.

    What are the steps to follow considering that I am not an expert girl on the subject?
    Can you tell me the steps to follow without using any plugin?
    Thank you

    • This topic was modified 1 year, 11 months ago by dianaclient.
Viewing 1 replies (of 1 total)
  • To set the text domain in a child theme you need this line in the style.css file:

    Text Domain: *your-text-domain*

    It doesn’t have to be the same as the parent theme, and in most caes shouldn’t be the same if you’re going to do translations.

    To include the PHP file, just use a standard include_once() or require_once() statement in your child themes functions.php file. The location of this file doesn’t matter but is should really be somewhere inside the child theme.

Viewing 1 replies (of 1 total)
  • The topic ‘How to manually create a text domain for the child theme?’ is closed to new replies.