Shortcodes?

Home Forums Calendar Products Events Calendar PRO Shortcodes?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #945217
    nothingtodo
    Participant

    Hi all, I feel like this should be a really easy thing to find and it is probably user error- I installed the WP to Twitter plugin and it allows for custom shortcodes to add additional information to the Tweets. I want to add venue name and event date but I can’t figure out what to call the fields. Using date gives the date I created the event which is not what I want.
    Below is the text from the plugin-
    Create custom shortcodes and access WordPress custom fields by using square brackets and the name of your custom field. Example: [[custom_field]]

    #945258
    George
    Participant

    Hey there @nothingtodo,

    This is an interesting question, but unfortunately you may not be able to get the Venue title just from that custom shortcode text.

    If that [[custom_field]] shortcode you described will let you get any bit of Post Meta, then for an event you can get the venue ID by referencing the Venue ID meta field on events. This field is named _EventVenueID – the underscore in front of the text is not a mistake a typo, it’s intentionally there.

    However, as the field name implies, this only gets the post ID of the venue, not the venue name itself. To do that, you’d need to use a WordPress function like get_the_title().

    I’m sorry if that’s a disappointment. One thing that might work a bit better than getting the Venue Name is getting the event start date – this is stored in a meta field called _EventStartDate, although in a timestamp format like in this screenshot → https://cloudup.com/ckop-pYxYAt

    I don’t know the WP to Twitter plugin well enough to know how customizable it is, but hopefully by calling these meta fields you can patch together something that works decently for your project’s needs. I’d recommend contacting the plugin’s support for more help with this request – share a link to this support ticket here on theeventscalendar.com even, it might help and save them some time if they can help with some custom code for you or something.

    Apologies for a bit of a rambling reply and some disappoint here, please let us know if there are any other questions or concerns you have!

    Cheers,
    George

    #983805
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Shortcodes?’ is closed to new replies.