vc_editor_set_post_types()

⌘K
  1. Home
  2. Docs
  3. Inner API
  4. vc_editor_set_post_types()

vc_editor_set_post_types()

SINCE 4.4

<?php vc_editor_set_post_types($post_types) ?>

Use this function to programmatically define which post types should have WPBakery Page Builder enabled.

Params

Param name Type Required Description
$post_types Array Yes The base tag name of the element shortcode.

Example

Enable WPBabery for posts.

<?php
add_action( 'vc_before_init', 'custom_set_wpbakery_editor_post_types' );
function custom_set_wpbakery_editor_post_types() {
    vc_editor_set_post_types( [ 'post', 'portfolio' ] );
}
?> 

 

Was this article helpful to you? No Yes

How can we help?