• Hi Guyz,

    I have this shortcode, when you click “+” it expands, but when you click “-” it won’t close. I’m not an expert and appreciate if someone can help to solve this.

    —————————
    /**
    Accordion element
    **/
    function wpb_acc_shortcode($atts,$content=NULL) {
    extract( shortcode_atts( array(
    ‘title’ => ‘Title’
    ), $atts) );

    global $wpb_acc_count;
    if(!$wpb_acc_count) { $wpb_acc_count = 1; }

    $output = ‘<div class=”title”><i class=”icon”></i>’.$title.’</div>’;
    $output .= ‘<div id=”acc-‘.$wpb_acc_count.'” class=”inner”>’.do_shortcode($content).'</div>’;

    $wpb_acc_count++;

    return $output;
    }
    add_shortcode(‘acc’,’wpb_acc_shortcode’);
    ————————————-

    Thanks
    Shiran

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    1. Please use the backticks ( or the code button ) when inputting code.
    2. What plugin? Is it a custom plugin?
    3. Does it work with all other plugins deactivated?
    4. Does it work with a default theme?

    Thread Starter wpshiran

    (@wpshiran)

    Hey jose,

    Sorry im new in posting here. This shortcode is done by someone else. Now im developing it. This is not a plugin. Its already in the theme and support as a shortcode.

    Any idea what’s missing?

    Thanks
    Shiran

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Short Code’ is closed to new replies.