How to Add Properly TAB items
-
Hi, I have tried To add TAB items, And i facing a problem.
How to View output with default shortcode Content .
please suggesion
see what i have did:<?php //Loading CSS function kingrd_tab_css() { wp_enqueue_style( 'kingcom_tab_box_css', plugins_url( '/css/style.css', __FILE__ ) ); } add_action( 'wp_enqueue_scripts', 'kingrd_tab_css' ); add_action( 'init', 'kingrd_tab_box_params', 99 ); function kingrd_tab_box_params() { global $kc; $kc->add_map( array( 'kingrd_tab' => array( 'name' => 'TAB', 'is_system' => true, 'title' => 'Sliders Settings', 'is_container' => true, 'params' => array( /* 'General' => array( array( 'type' => 'text', 'label' => __( 'Main Wrappper Editing', 'kingcomposer' ), 'name' => 'title', 'description' => __( 'Title of the progress bar. Leave blank if no title is needed.', 'kingcomposer' ), 'admin_label' => true, ), ),*/ ) ) ) ); $kc->add_map( array( 'kingrd_tabs' => array( 'name' => 'TAB', 'Description' => 'This is Item Container', 'icon' => 'kc-icon-box', 'is_container' => true, 'category' => 'RD Extensions', 'title' => 'Sliders Settings', 'is_container' => true, 'params' => array( 'General' => array( array( 'type' => 'text', 'label' => __( 'Title Setting', 'kingcomposer' ), 'name' => 'title', 'description' => __( 'Title of the progress bar. Leave blank if no title is needed.', 'kingcomposer' ), 'admin_label' => true, ), ), ), 'views' => array( 'type' => 'views_sections', 'sections' => 'kingrd_tab', // this is children item was added above 'display' => 'vertical|horizontal' // kc_slider is shortcode children // the out put will look like this: // [kc_sliders][kc_slider]...[/kc_slider][/kc_sliders] ) ) ) ); } // Container Shortcode function kingrd_tabbox_shortcode($atts, $content = null) { $output = ''; extract(shortcode_atts(array( ), $atts)); $output .= ' <div class="test-wrapper">'; $output .= do_shortcode($content); $output .= '</div>'; return $output; } add_shortcode( 'kingrd_tab', 'kingrd_tabbox_shortcode' ); // Register Hover Shortcode function kingrd_tabbox_shortcode_item( $atts, $content = null ) { extract( shortcode_atts( array( 'title' => 'Title Goes here', ), $atts ) ); $output = '<h2>I am TAB</h2>'; return $output; } add_shortcode( 'kingrd_tabs', 'kingrd_tabbox_shortcode_item' );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to Add Properly TAB items’ is closed to new replies.