Overriding plugin assets

You can override any of the VicTheme Property or VicTheme Agents or VicTheme Core plugins default CSS and Javascript assets by registering a new assets to replace the old assets.

For example, to override the property-front.css which is bundled inside the property-front assets you can do the following steps :

Step One – Registering theme assets folder

Create a new folder called /assets in your theme root folder.

Then add this code to your theme functions.php :


if (class_exists('VTCore_Wordpress_Init')) {

  $themePath = get_stylesheet_directory();
  $themeUrl = get_stylesheet_directory_uri();

    ->detect($themePath . DIRECTORY_SEPARATOR . 'assets', $themeUrl . '/assets');


Step Two – Copy The Old Assets Folder Into New one

Copy the old assets folder (in this case is victheme_property/assets/property-front) into the newly created folder at {theme_path}/assets .

Notice that the folder name will be the assets name.

Step Three – Edit The assets

Edit the copied assets to match your customization.


Now whenever plugin / themes called the core assets factory to load the assets file, the factory will load your overridden assets instead of the original one.

Show All