Skip Navigation

[Résolu] %%POST_TITLE%% in CRED Notifications

This support ticket is created Il y a 5 années. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par julieP Il y a 5 années.

Assisté par: Waqar.

Auteur
Publications
#1389343

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?

#1389485

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:
lien caché

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#1390985

Hi Waqar

Many thanks for this and also for providing some ways to avoid it; much appreciated