If you are planning to use this theme with big customization, we provide the child theme that is bundled on the theme’s folder to achieve your goal.
Installing the child theme is quite easy and basically is almost the same as installing JNews. Below there are a few essential steps you need to follow to install the JNews child theme.
- Import and Export Theme Settings (#)
- Import and Export Widget (#)
- Installing Child Theme (#)
- Override Default JNews File (#)
1. Import and Export Theme Settings
You need to move your theme settings. You can use Customizer Export/Import plugin.
After the plugin is installed. Please go to Customizer → Export/Import. At the parent theme, you can export the settings. The file settings will be downloaded. You can import that file later after you switch the theme to the child theme.
2. Import and Export Widget
Then you need to move your widget. You can use Widget Importer & Exporter plugin.
After the plugin is installed. Please go to WP Admin Dashboard → Tools → Widget Importer & Exporter. At the parent theme, you can export all widgets. The widget data file will be downloaded. You can import that file later after you switch the theme to the child theme.
3. Installing Child Theme
After downloading the JNews package from Themeforest you need to extract that file, and then you will find a zip file with the name jnews-child.zip . This is the child theme file of JNews.
1. Go to Appearance → Themes on your WordPress Admin Dashboard.
2. Click the Add New button at the top of the page and then choose Upload Theme option.
3. After that, upload the jnews-child.zip file ( look at the image above) and click Install Now
4. When the upload has finished, click Activate and now you’re ready to create some customization on JNews with your own need.
4. Override Default JNews File
By using a Child theme, you can override JNews default files such as fragments, module/element view, classes, and more. We’ll provide an example of how to override a file for the JNews Module 5 view. To do this, follow these steps:
1. Find the file that display the module and determine its file path. In the case of the JNews Module 5 view, it’s located in the directory wp-content/themes/jnews/class/Module/Block/Block_5_View.php.
2. Create a file with the same name and path in your JNews Child directory and paste the modified code from Block_5_View.php .
Keep in mind that when you override the default JNews files, any updates to those files in a theme update will not affect your website. There is a possibility that updates to those files are crucial, and overriding them may cause a Fatal Error that damages your website. If at any time your website experiences a Fatal Error related to an overridden file, you need to revert the overridden file to the default theme file. You can do this by renaming the files you used to override in the child theme directory or by deleting them. Alternatively, you can adjust them according to the latest updates to the files and override them again.
Top ↑