WordPress.org

Ready to get started?Download WordPress

Forums

adjusting default accordion to closed (1 post)

  1. dragonBoy2
    Member
    Posted 1 year ago #

    I am building a peekaboo website and I am trying to set the default accordion to closed. Is this possible? Thank You.
    the accordion code is:

    add_shortcode('acc', 'pkb_accordion');
    
    function pkb_accordion( $atts, $content = null ) {
        extract(shortcode_atts(array(
    		'title'    	 => 'Title here'
        ), $atts));
    	$out .= "<h4 class=\"acc_toggler\"><span>&nbsp;</span><a href=\"#\">".$title."</a></h4>
    	<div class=\"acc_inner\"><div class=\"block\">".parse_shortcode_content( $content )."</div></div>";
        return $out;
    }

Topic Closed

This topic has been closed to new replies.

About this Topic