close Notifications

Overriding & Editing Smart Sections files using your (child) theme

Advanced
Smart SectionsSmart Sections, October 22, 2020 20:09

In the new version of 1.5.6, we have added a feature to override Smart Sections files so that you can customize them for your own needs. Here is how it works:


If you want to edit a specific file in Smart Sections, open a new folder in your theme named "smart-sections" and simply copy the file to this folder.


For example;


If you want to override the following file:


plugins/visucom-smart-sections/includes/enqueue.php


Copy this file to the following folder and edit it as you wish:


themes/YOUR_ACTIVE_THEME/smart-sections/includes/enqueue.php


Smart Sections will first check this folder if there is an override, then include the files if they exist. Otherwise, it will include the default files in the plugin folder.


This feature is available for the following files:


  • All files inside the "includes" folder
  • All files inside the "init" folder
  • All files inside the "vc_elements" folder
  • All files inside the "vc_params" folder
  • The init.php file in the root folder.


Caution: Please do this customization at your own risk, if you know what you are doing. Any wrong coding may generate a fatal error and put down your site completely.


Warning: Do not edit these files within the core plugin itself as they are overwritten during the upgrade process and any customization will be lost.

Do you find this article useful?

2 0

Enter Video URL (Youtube or Vimeo)