Skip to content

Commit

Permalink
Fix Group Output Bug with Accordion
Browse files Browse the repository at this point in the history
Moved the accordion wrapper check after the group description output
which fixes a display bug.

Fixes #40
  • Loading branch information
j-gardner committed Dec 2, 2015
1 parent ce0df8f commit 8562088
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions includes/class-arconix-faq-display.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,14 @@ public function loop( $args, $echo = false ) {

$html .= '<h3 id="faq-' . $term->slug . '" class="arconix-faq-term-title arconix-faq-term-' . $term->slug . '">' . $term->name . '</h3>';

if ( $accordion )
$html .= '<div class="arconix-faq-accordion-wrap">';

// If the term has a description, show it
if ( $term->description )
$html .= '<p class="arconix-faq-term-description">' . $term->description . '</p>';

// Output the accordion wrapper if that style has been set
if ( $accordion )
$html .= '<div class="arconix-faq-accordion-wrap">';

// Loop through the rest of the posts for the term
while ( $q->have_posts() ) : $q->the_post();

Expand All @@ -121,6 +122,7 @@ public function loop( $args, $echo = false ) {

endwhile;

// Close the accordion wrapper if necessary
if ( $accordion )
$html .= '</div>';

Expand Down

0 comments on commit 8562088

Please sign in to comment.