Detect Visual Composer

前端 未结 4 1161
攒了一身酷
攒了一身酷 2021-02-09 01:08

Is there a way to detect if a WordPress page is using Visual Composer?

I have 2 different page templates:

  1. Default template for regular pages.
  2. Temp
4条回答
  •  死守一世寂寞
    2021-02-09 01:41

    You can detect with is_plugin_active:

    if ( is_plugin_active( 'js_composer/js_composer.php' ) ) {
         //your code here
    }
    

提交回复
热议问题