Any changes you make to a WordPress theme will be lost when it is next updated. To avoid this create a child theme.
To create a child theme (within the themes directory) :-
Add a directory with the same name as the theme you would like to modify but with ‘-child’ appended. Change to this directory and use it for the remainder of the article.
Add a style.css file containing the following :-
/* Theme name: [main theme name] child theme Template: [main theme directory] */
Create a functions.php file containing the following code :-
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles'
= '[main theme]-style';
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css'
get_stylesheet_directory_uri() . '/style.css',
To override other files you will need to copy them from the main theme’s directory to that of the child theme and edit them there.
Activate your child theme from the admin menu in Appearance > Themes.
Now any styles you add to style.css will override the main theme and you can add new functions in the functions.php file.