Impossible to select acf field and display them into calendar (i’m testing with Google).
There are no samples even a cheap one to show how to add code for displaying infos from acf fields inside different calendar emplacement, neither even post title.
Hi Nico,
Even the plugin does not explicitly support any combination with third party plugins, it is possible to use a shortcode inside the shortcode that comes with this plugin.
You can check other recent posts for some samples.
In doubt, you can share your code here to get some help.
Best, Jens
Hi thanks for replying to me.
But i tried to search and test few codes that i found here and i couldn’t succed
What i need is
[add-to-calendar-button name=”my post title field” options=”‘Apple’,’Google'” startDate=”my post acf field named event_date” description= “my post acf field named description”]
hi,
thank you for your answer.
i red this one and all other questions regarding ACF integration
i assume that
startDate=”{sc_start}acf:welcome_page_date_and_start_time{sc_end}”
Means that ACF field name is > welcome_page_and_start_time
but it doesn’t work for me when adding my acf field. (Maybe due to my date format – that’s why I added a screen capture to let me know what kind of date format I need to set)
regarding the other elements
any ACF text field
do have I to add it with ACF: First inside same {sc_start} and {sc_end} ? Cause it doesn’t work
post title > what code or value have I to add to display my post title (inside same {sc_start} and {sc_end} ?)
Thx
you need to use the shortcode function. see https://www.advancedcustomfields.com/resources/shortcode/
{sc_start} represents the beginning “[” of it. {sc_end} the “/]”.
Thank you for your reply.
By refering to your ACF link explanation i tried by displaying
acf field named : lieu_evenement
using shortcode in my wysiwig editor as [acf field=”lieu_evenement”]
And it works fine by displaying field value inside my text
But when adding same shortcode in the way you mentionned it inside your calendar button sortcode as
description= “{sc_start}acf field=”lieu_evenement”{sc_end}”
i get nothing inside my Google Agenda description
When displaying
description= {sc_start}acf field=”lieu_evenement”{sc_end}
i get only acf characters written inside my Google Agenda description
So i haven’t tried yet acf date value as i’m not able to display simple acf shortcode text and neither post title cause i don’t know what value i have to add.
I think that in all your basic samples you could provide a simple with post title, acf date and an any acf field that needs to be display in description.
Hi i succeded in ! 🙂
Date value is missing….:(
Post title
i added a php code for creating a shortcode named post_title for using then inside add to calendar button code :
name=”{sc_start}post_title{sc_end}”
ACF fields value
i added my acf shortcode in this way :
location= “{sc_start}acf field=acf_field_name{sc_end}”
description= “{sc_start}acf field=acf_field_name{sc_end}”
ACF Start value
I get an error message : falide: date misspelled YYYY-MM-DD
As my date is an ACF value from ACF date picker how can i display value without mispelling it ?
Or how can i add my value and transform value result in date that would be good ?
Thanks in advance in helping me for this last missing point
Hi,
Thank you for your support.
I succeded for adding Start Date value to calendar by formating my ACF fields into correct / needed value.
@nico-lino Can you share the shortcode that works for you?
I tried multiple variables but nothings seems to work.
Specially I see the double quotes and double quotes are different that the initially the plugin offer.
Which ones are the correct ones?
here is the shortcodes that worked for me.
you can see on live here : https://acaa.fr/projet-noel-strasbourg/
[add-to-calendar-button styleLight=”–btn-background: #C71E98; –btn-text: #fff;” debug name=”{sc_start}post_title{sc_end}” options=”‘Apple’,’Google'” startDate=”{sc_start}acf field=date_evenement{sc_end}” endDate=”{sc_start}acf field=date_fin_evenement{sc_end}” label=”ajouter au calendrier” location= “{sc_start}acf field=lieu_evenement{sc_end}” description= “{sc_start}acf field=introduction{sc_end}”]