<?php

function xs_faqgroup($atts, $content = null) {
    return'<div class="col-md-6 col-sm-12 xs-faq"><div class="panel-group clearfix" >' . do_shortcode($content) . '</div></div>';
}

add_shortcode('xs_faqgroup', 'xs_faqgroup');

function xs_accordion($atts, $content = null) {
    extract(shortcode_atts(array(
        'id' => rand(100, 1000),
        'title' => '',
        'collapse' => '',
                    ), $atts, 'xs_accordion'));



    return '<div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title"> <a data-toggle="collapse" data-parent="#questions" href="#' . $id . '"><span>' . $title . '</span> </a> </h4>
            </div>
            <div id="' . $id . '" class="panel-collapse collapse">
                <div class="panel-body">' . $content . '</div>
            </div>
        </div>';
}

add_shortcode("xs_accordion", "xs_accordion");





