Navigation überspringen

[Gelöst] %%POST_TITLE%% in CRED Notifications

This support ticket is created vor 5 Jahren, 1 Monat. 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.

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)

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von julieP vor 5 Jahren, 1 Monat.

Assistiert von: Waqar.

Author
Artikel
#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:
versteckter Link

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