samglover / client-power-tools

https://clientpowertools.com
GNU General Public License v3.0
6 stars 2 forks source link

Post ID is not reset after calling the status update request button #54

Closed samglover closed 1 month ago

samglover commented 1 month ago

When a client has requested a status update, the post ID is not reset to the main query, so later calls to get_the_ID() will return the status update request message ID instead.

samglover commented 1 month ago

Looks like the post data is not being reset in cpt_messages(). Added wp_reset_postdata() at the end of the function to remedy that.