Support » Plugin: Page Builder: KingComposer - Free Drag and Drop page builder by King-Theme » How to output custom css from css property selector

  • Hello, i am trying to build an addon with add_shortcode() function. But i am unable to get custom css output. Here is my code below

    
    'Styling' => array(
        array(
            'name'    => 'css_custom',
            'type'    => 'css',
            'options' => array(
                array(
                    "screens" => "any,1024,999,767,479",
                    'Style' => array(
                        array('property' => 'color', 'label' => 'Icon Color', 'selector' => 'i'),
                        array('property' => 'font-size', 'label' => 'Icon Size', 'selector' => 'i'),
                    ),
                    'Texts' => array(
                        array('property' => 'color', 'label' => 'Text 1 Color', 'selector' => 'h3.text1'),
                        array('property' => 'color', 'label' => 'Text 2 Color', 'selector' => 'h3'),
                    )
                )
            )
        )
    ),
    

    Can you assist me about how to get these field value?

    Regards
    Noor

    • This topic was modified 2 years, 9 months ago by themebon.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Anthony

    (@cuongthan1998)

    Hi

    Your code has nothing wrong,

    Do you try to see if your code lacks a mark?

    Thread Starter themebon

    (@themebon)

    Hi, how can i use this custom css property into shortcode function ?

    
    function shortcode_function($atts, $content = null){
        extract( shortcode_atts( array(
            'text1'  => '',
            'extraclass'    => '',
            
        ), $atts) );
        
        $output ='<div class="text-class '.$extraclass.'"><h2>'.$text1.'</h2></div>';        
        
        return $output;
    }
    add_shortcode('shortcode1', 'shortcode_function');
    
    Anthony

    (@cuongthan1998)

    Hi

    Please read carefully the docs of kingcomposer to be able to develop shortcode: http://docs.kingcomposer.com

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to output custom css from css property selector’ is closed to new replies.