comments on page with recent posts shortcode
-
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 ofwp_reset_query()
2. the reset should happen before the return statement
Changing those fixed the comments problem.
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.