PHPackages                             khromov/wp-vc-template-manager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. khromov/wp-vc-template-manager

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

khromov/wp-vc-template-manager
==============================

Easily add version-controlled templates to your Visual Composer project

1.0(11y ago)177435GPL2PHP

Since Jan 25Pushed 11y ago4 watchersCompare

[ Source](https://github.com/khromov/wp-vc-template-manager)[ Packagist](https://packagist.org/packages/khromov/wp-vc-template-manager)[ RSS](/packages/khromov-wp-vc-template-manager/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Visual Composer Template Manager
--------------------------------

[](#visual-composer-template-manager)

This plugin provides a framework for creating themes and plugins that utilize the built-in template function in Visual Composer (as of version 4.4)

It works by loading templates from files in your theme (and optionally plugin) folders, making it possible to version control templates in a simple way.

### Building templates

[](#building-templates)

Building a template is easy. Start out by creating a layout in Visual Composer. (For example, by creating a new page with the layout you want.)

When you are done, click the "Classic mode" button to return to the TinyMCE WYSISYG, and then click on the Text tab. Now you can copy the content of your layout into a template!

Workflow:
[![Visual workflow of text above](https://camo.githubusercontent.com/425fd468064c5610b2abe1ce5ff49f16e31983c3ca31893b3af558a1fc5710d8/68747470733a2f2f646c2e64726f70626f7875736572636f6e74656e742e636f6d2f752f323735383835342f76632d77686174646f2e706e67)](https://camo.githubusercontent.com/425fd468064c5610b2abe1ce5ff49f16e31983c3ca31893b3af558a1fc5710d8/68747470733a2f2f646c2e64726f70626f7875736572636f6e74656e742e636f6d2f752f323735383835342f76632d77686174646f2e706e67)

### Using in a theme

[](#using-in-a-theme)

To bundle templates with your theme, create the folder:

```
/your-theme/vc_templates

```

Then, create a file, for example:

```
/your-theme/vc_templates/my-template.php

```

The only requirement is that the file has a .php extension.

Paste the template you got from the "Building templates" section above, and you will see a new template called "My Template" after you click on Templates &gt; Default Templates in Visual Composer. You're done!

Workflow:
[![Visual explanation of text above](https://camo.githubusercontent.com/b73d527cbee762d18713dc710e96a25f2c5a078f4223a45d03ac36afa31c6044/68747470733a2f2f646c2e64726f70626f7875736572636f6e74656e742e636f6d2f752f323735383835342f76632d696e736572742e706e67)](https://camo.githubusercontent.com/b73d527cbee762d18713dc710e96a25f2c5a078f4223a45d03ac36afa31c6044/68747470733a2f2f646c2e64726f70626f7875736572636f6e74656e742e636f6d2f752f323735383835342f76632d696e736572742e706e67)

### Using in a plugin

[](#using-in-a-plugin)

If you want to use this in a plugin, use the vctm\_template\_locations filter to add a custom path in which templates will be searched.

If your plugin directory is:

```
/my-plugin/

```

Create the folder vc\_templates/

```
/my-plugin/vc_templates

```

Add the following code to your main plugin file:

```
add_filter('vctm_template_locations', function($locations)
{
    //Add custom plugin path location
    $locations[] = plugin_dir_path( __FILE__ ) . 'my_templates/';

    //Return
    return $locations;
});
```

### Forking the base plugin

[](#forking-the-base-plugin)

You can fork this plugin by simply changing the folder name and removing the row starting with "GitHub Theme URI" from the plugin header.

You can then add your templates in the vc\_templates/ folder of the plugin.

The hook prefix can be modified by changing the $VCTM\_PREFIX variable in the main plugin file.

The translation textdomain can be changed with the vctm\_textdomain filter:

```
add_filter('vctm_textdomain', function($textdomain)
{
    return 'my_custom_textdomain';
});
```

### Removing default templates

[](#removing-default-templates)

Visual Composer ships with a lot of default templates. If you wish to remove these and only keep the ones you add with this plugin, add the following code in your themes functions.php file, or a plugin:

```
add_action('vctm_disable_builtin_templates', '__return_true');
```

### Known issues

[](#known-issues)

Due to a bug in Visual Composer (as of 4.4.1), it is not possible to reorder the templates. They will always be ordered in alphabetical order. We hope to solve this with future versions of VC.

### Hooks

[](#hooks)

This plugin exposes hooks to control almost anything.

##### vctm\_disable\_builtin\_templates

[](#vctm_disable_builtin_templates)

Lets you disable VC:s own built-in templates

*Parameters: $current\_value - Boolean*
*Return value: Boolean*

##### vctm\_template\_locations

[](#vctm_template_locations)

Lets you register custom template locations for use in plugins and themes.

*Parameters: $locations - Array of current paths which will be looked in for templates*
*Return value: Array of current locations (Append your location to existing array)*

##### vctm\_&lt;TEMPLATE\_SOURCE&gt;\_name\_&lt;TEMPLATE\_NAME&gt;

[](#vctm_template_source_name_template_name)

Lets you change the name that is displayed in VC for a given template

*Dynamic value: &lt;TEMPLATE\_SOURCE&gt; - The source of the template. "theme" if it came from the theme, "vctm" if it came from the VCTM plugin and "plugin" if it came from a third party plugin using the vctm\_template\_locations hook. (Don't register multiple paths where template names can collide - you won't be able to filter them.)*
*Dynamic value: &lt;TEMPLATE\_NAME&gt; - The name of the template, without extension. Example: my\_template*
*Parameters: $current\_name - The auto-generated name*
*Return value: String - new name*

##### vctm\_&lt;TEMPLATE\_SOURCE&gt;\_class\_&lt;TEMPLATE\_NAME&gt;

[](#vctm_template_source_class_template_name)

Lets you change the HTML class which wraps the plugin in the VC modal. Lets you set the template icon through CSS.

*Dynamic value: &lt;TEMPLATE\_SOURCE&gt; - The source of the template. "theme" if it came from the theme, "vctm" if it came from the VCTM plugin and "plugin" if it came from a third party plugin using the vctm\_template\_locations hook. (Don't register multiple paths where template names can collide - you won't be able to filter them.)*
*Dynamic value: &lt;TEMPLATE\_NAME&gt; - The name of the template, without extension. Example: my\_template*
*Parameters: $current\_class\_name - The auto-generated class name*
*Return value: String - new name*

##### vctm\_&lt;TEMPLATE\_SOURCE&gt;\_content\_&lt;TEMPLATE\_NAME&gt;

[](#vctm_template_source_content_template_name)

Lets you dynamically alter the contents of a template, for example to perform pre-processing.

*Dynamic value: &lt;TEMPLATE\_SOURCE&gt; - The source of the template. "theme" if it came from the theme, "vctm" if it came from the VCTM plugin and "plugin" if it came from a third party plugin using the vctm\_template\_locations hook. (Don't register multiple paths where template names can collide - you won't be able to filter them.)*
*Dynamic value: &lt;TEMPLATE\_NAME&gt; - The name of the template, without extension. Example: my\_template*
*Parameters: $current\_content - The template content*
*Return value: String - new template content*

### Miscellaneous

[](#miscellaneous)

#### Template name generation

[](#template-name-generation)

We generate a "nice" template name based on the file name. Dashes and underscores are replaced with spaces and each word is capitalized. You can override it with the vctm\_&lt;TEMPLATE\_SOURCE&gt;\_name\_&lt;TEMPLATE\_NAME&gt; filter.

#### GitHub updater

[](#github-updater)

This plugin supports GitHub updater.

#### Composer

[](#composer)

This plugin supports Composer through the [composer/installers](https://packagist.org/packages/composer/installers) package.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4122d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3975396d0412f72f2ed8ce8494099587da4ccdf8501c0a05f7d617c6adbc07af?d=identicon)[khromov](/maintainers/khromov)

---

Top Contributors

[![khromov](https://avatars.githubusercontent.com/u/1207507?v=4)](https://github.com/khromov "khromov (15 commits)")

---

Tags

wordpressvcsvisual composer

### Embed Badge

![Health badge](/badges/khromov-wp-vc-template-manager/health.svg)

```
[![Health](https://phpackages.com/badges/khromov-wp-vc-template-manager/health.svg)](https://phpackages.com/packages/khromov-wp-vc-template-manager)
```

###  Alternatives

[roots/bedrock

WordPress boilerplate with Composer, easier configuration, and an improved folder structure

6.5k441.8k2](/packages/roots-bedrock)[cedaro/gravity-forms-iframe

Embed a Gravity Form on any site using an iframe.

1563.0k](/packages/cedaro-gravity-forms-iframe)[iceicetimmy/acf-post-type-selector

Post type selector for Advanced Custom Fields.

559.0k](/packages/iceicetimmy-acf-post-type-selector)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
