Short Code
-
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)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Short Code’ is closed to new replies.