• Resolved egroll

    (@egroll)


    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 6 years, 8 months ago by egroll.
    • This topic was modified 6 years, 8 months ago by egroll.
    • This topic was modified 6 years, 8 months ago by egroll.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Shortcode with WP to Twitter’ is closed to new replies.