king-theme
Forum Replies Created
-
Hi!
edit your code as bellow
$image = wp_get_attachment_image_src( $image_id, 'full' ); echo $image[0];
And you also can change ‘full’ to ‘medium’, ‘large’, ‘thumb’. Those are default sizes when you upload your media
Hi!
Our plugin supports filter for every element, you can do everything before return to body content.
Check our document https://docs.kingcomposer.com/shortcode-filter/
Hi!
You can add your custom class to almost of element: Row, column…etc by click edit, when the popup opens, you will see the input to add your classes.
Please try this code bellow
function kc_admin_notice() { $class = 'notice notice-warning'; $message = __( 'King Composer plugin is required to use this plugin.', 'text-domain' ); printf( '<div class="%1$s"><p>%2$s</p></div>', $class, $message ); } if(!function_exists('is_plugin_active')){ include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); } if ( !is_plugin_active( 'kingcomposer/kingcomposer.php' ) ) add_action( 'admin_notices', 'kc_admin_notice' );
I’ve updated the plugin to version 2.2.1
Now you can use the field “editor” instead
global $kc; $kc->add_map( array( 'cs_text' => array( 'name' => __('Text', 'cs'), 'description' => __('Add a simpel textarea', 'cs'), 'icon' => 'fa-align-left', 'category' => 'Content', 'is_container' => true, 'params' => array( array( 'name' => 'content1', // now you can set arbitrary name 'type' => 'editor', // use 'editor' type instead 'admin_label' => true, // show preview on builder ), array( 'name' => 'content2', // able to use multiple editor on one element 'type' => 'editor', 'admin_label' => true, ) ) ) ) ); add_shortcode('cs_text', 'cs_text'); function cs_text($atts) { $content1 = base64_decode( $atts['content1'] ); // To keep safety content format, we must encode by base64. // So you just decode before use return $content1; }
Hi Yanick!
Please wait, I am checking and get back to you in 30 minutes.
Hi!
First of all, this field is special because its data format.
This field required container shortcode such as [name]content[/content]
so make sure that you added the config:
is_contaner => true
Please read careful our document https://docs.kingcomposer.com/available-param-types/textarea-html-field/
Hi Yanick!
Yes, you can do that by adding this code bellow in your theme file function.php.
add_action('init', 'your_init'); function your_init(){ global $kc; if( isset( $kc ) ){ // make sure that the KC plugin is actived $kc->remove_map('kc_row_inner'); $kc->remove_map('kc_box'); // ...etc } }
Hi!
Raw code element supports HTML, CSS, JS, Shortcodes
Best Regards,
KC TeamI have updated css for Flipbox element to work with Safari. Please update to version 2.2.0.5
Hi!
Thanks for your comment! Let us check it.
PS: The builder backend works great on google chrome.
Hi There!
Please read example: kingcomposer/shortcodes/kc_single_image.php
To how get url from image id with sizes.
Hi!
please use this code bellow to check:
if(!function_exists(‘is_plugin_active’)){
include_once( ABSPATH . ‘wp-admin/includes/plugin.php’ );
}if ( is_plugin_active( ‘kingcomposer/kingcomposer.php’ ) ){
// do your code
}[resolved]