If I use %%POST_TITLE%% in email notifications and the post status is Publish, the output is The Post Title but if the post status is Private, the output is Private: The Post Title.
Is this expected?
Hi Julie,
Thank you for contacting us and I'd be happy to assist.
This is expected since WordPress adds prefixes "Private" and "Protected" to post titles when the base "get_the_title" function is used.
( ref: https://developer.wordpress.org/reference/functions/get_the_title/ )
If you'd like to avoid these prefixes from the email notifications, you can replace placeholder "%%POST_TITLE%%" with "[wpv-post-title]" shortcode.
( ref: https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-title )
Alternatively, if you'd like to remove these prefixes from the titles globally, you can also use "the_title" filter:
https://developer.wordpress.org/reference/hooks/the_title/
Example:
hidden link
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
Hi Waqar
Many thanks for this and also for providing some ways to avoid it; much appreciated