samglover / client-power-tools

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

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

Closed samglover closed 2 months ago

samglover commented 2 months 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 2 months 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.