WordPress.org

Ready to get started?Download WordPress

Forums

Accordion Shortcode
Auto height based on content size is broken. (7 posts)

  1. cfischer83
    Member
    Posted 7 months ago #

    The code here:

    $query_atts = shortcode_atts( array(
    				'autoHeight'  => false,
    				'disabled'   => false,
    				'active'  => 0,
    				'animated'   => 'slide',
    				'clearStyle'  => false,
    				'collapsible'  => false,
    				'event'   => 'click',
    				'fillSpace'  => false
    			), $attr);

    Needs to include the heightStyle: content as an option. Otherwise content overflows into other accordion items when the first accordion has a shorter content area than the succeeding accordion items. I have fixed it by adding the following to the accordion:

    $query_atts = shortcode_atts( array(
    				'autoHeight'  => false,
    				'disabled'   => false,
    				'active'  => 0,
    				'animated'   => 'slide',
    				'clearStyle'  => false,
    				'collapsible'  => false,
    				'event'   => 'click',
    				'fillSpace'  => false,
    				'heightStyle' => 'content'
    			), $attr);

    http://wordpress.org/plugins/accordion-shortcode/

  2. melanieamorim
    Member
    Posted 7 months ago #

    Awesome - Thank you !!

  3. etrnluv
    Member
    Posted 6 months ago #

    OMG thank you for this...was banging my head with the height on my accordion...was sticking over 1000 px in each one!! The rest of the panels were way down on the page you couldn't even see them!! Thank you again!

  4. VicVP
    Member
    Posted 6 months ago #

    Superb!! Thank you.

  5. hooperman13
    Member
    Posted 6 months ago #

    Worked a treat. Many thanks.
    Does anyone know if there are any plans to incorporate this fix into plugin?

  6. Sendoku
    Member
    Posted 5 months ago #

    Awesome, thanks so much!

  7. Osu
    Member
    Posted 1 month ago #

    I love you. Saved me a big headache with this, thank you!

Reply

You must log in to post.

About this Plugin

About this Topic