WordPress.org

Forums

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

  1. cfischer83
    Member
    Posted 1 year 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 1 year ago #

    Awesome - Thank you !!

  3. etrnluv
    Member
    Posted 1 year 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 1 year ago #

    Superb!! Thank you.

  5. hooperman13
    Member
    Posted 1 year ago #

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

  6. Sendoku
    Member
    Posted 1 year ago #

    Awesome, thanks so much!

  7. Osu
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Accordion Shortcode
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic