Close

Account

Documentation

Forum

Menu

Next
Prev

Child Theme

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.

  1. Import and Export Theme Settings (#)
  2. Import and Export Widget (#)
  3. Installing Child Theme (#)
  4. Override Default JNews File (#)
Child Theme Right after installing child theme you need to go to wp-content/themes/jnews-child/ and in there you will find several files (functions.php & style.css). Put your custom code on those files and also additional file(s) that you want to use if you have to. You can put the customization files on the same directory structure as in the parent theme.

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 CustomizerExport/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.

Top ↑

 

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 DashboardToolsWidget 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.

Top ↑

 

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.

Top ↑

 

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 .