• Resolved Chris Dillon

    (@cdillon27)


    I have a page with the recent posts shortcode and comments enabled. Comments were being added the first post instead of the page. Looking at the code, I noticed 2 things.

    1. wp_reset_postdata() should be used instead of wp_reset_query()

    2. the reset should happen before the return statement

    Changing those fixed the comments problem.

    https://www.ads-software.com/plugins/fruitful-shortcodes/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘comments on page with recent posts shortcode’ is closed to new replies.