Custom Shortcode with WP to Twitter
-
Hello,
I am using WP to Twitter version 3.3.6. It is a great plugin and has good documentation. However I have a problem:With ACF I defined the field “anfangsdatum” (date of begin of exhibition). When I update the post of an exhibition, a tweet is created from the template “
{{anfangsdatum}} #title# #url#” (brackets changed). The shortcode from ACF gives the raw value of the date “yyyymmdd“. So date is in the tweet, but the text is not nice formatted for readers. Therefore I coded my own shortcode “datum_beginn” with the plugin code snippets.function datum_beginn_funktion() { return 'test'; // only for test; later format the ACF field value "anfangsdatum" for German readers } add_shortcode('datum_beginn', 'datum_beginn_funktion');In a normal post my shortcode works, but not in WP to Twitter. The template “
{{datum_beginn}} #title# #url#” renders only the title and the URL. The word “test” is lost. Where is my error?Thank you in advance and greetings
Eckhard- This topic was modified 7 years, 10 months ago by .
- This topic was modified 7 years, 10 months ago by .
- This topic was modified 7 years, 10 months ago by .
The page I need help with: [log in to see the link]
The topic ‘Custom Shortcode with WP to Twitter’ is closed to new replies.