I want to use a child theme. How can I do that?
If you want to use a child theme, please follow these steps:
- First of all, make sure that you haven’t changed the parent theme’s folder name. It needs to remain the same.
- You should be able to find the folder your_theme_name-child in the package you've downloaded from ThemeForest.
- Please copy this folder to /wp-content/themes folder on your server.
- Go to Appearance > Themes in your wp-admin console and activate child theme. Please have in mind that all required plugins need to be activated.
To replace a function, copy it from the parent theme to the functions.php file in your child theme and make your modifications.
For example, if you want to change default pagination HTML output, you need to copy entire function to the child theme:
/** * Pagination output for post archive */ if ( ! function_exists( 'boldthemes_pagination' ) ) { function boldthemes_pagination() { ... } }
And then replace the output according to your needs. For example
if ( ! function_exists( 'boldthemes_pagination' ) ) { function boldthemes_pagination() { echo '<div class="new-archive-pagination"></div>; } }
Please note that this is an example for one function, and it might differ for other functions and changes.
You can find additional info in this article from EnvatoTuts+.