studiopress / genesis-simple-faq

An accessible, performant WordPress plugin that adds FAQ management and rendering to your Genesis child theme.
10 stars 7 forks source link

Posts after Simple FAQ content fail to display in post archives #33

Closed nickcernis closed 5 years ago

nickcernis commented 7 years ago

When using the blog page template, posts after a post that contains Simple FAQ content fail to display. The current page title displays instead:

blog

To reproduce:

  1. Create a blog page using the Blog template.
  2. Ensure Genesis → Theme Settings → Content Archives is set to display Entry Content with no limit.
  3. Make sure there are at least two posts displaying on the blog page.
  4. Edit the first post and add a Simple FAQ shortcode.
  5. Return to the blog page. The second post and onward fail to display.

Changing wp_reset_query(); to wp_reset_postdata(); in includes/class-gs-faq-shortcode.php seems to solve the issue. We should use wp_reset_postdata in includes/class-gs-faq-widget.php too.