Where i put my code function in theme file function.php it disappear

This topic has 5 replies, 3 voices, and was last updated 6 years, 2 months ago ago by Olga Barlow

  • Avatar: maxoranew
    maxoranew
    Participant
    February 20, 2018 at 08:13

    where i put my code function in theme file function.php it disappear after few days how to fix that?

    4 Answers
    Avatar: maxoranew
    maxoranew
    Participant
    February 20, 2018 at 08:15

    sorry i mean ( when ) i put my code ( not = where )

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    February 20, 2018 at 10:13

    Hello,

    To make changes in theme file you need to use a child themehttps://codex.wordpress.org/Child_Themes

    Regards

    Avatar: maxoranew
    maxoranew
    Participant
    February 21, 2018 at 07:17

    Hi I’m have a problem with your theme. Each time I put a new function in theme file function.php it’s disappear . How to fix that ?

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    February 21, 2018 at 11:28

    Hello,

    You need to install and activate child theme (follow documentation https://xstore.helpscoutdocs.com/article/32-child-theme ) and then if you need to do any changes (styles or code) use child theme. How child theme works you can read here https://codex.wordpress.org/Child_Themes

    So, add your functions into child theme functions.php instead of the parent theme. All the changes made in parent theme will be lost after theme update.

    Let me know if you need any other detailed explanation.

    Regards

  • Viewing 5 results - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.