event details generated off Custom Post Type fields

[ad_1]

I’m experimenting with this plugin and trying to incorporate it with a event custom post type, that utilizes the Advanced Custom Fields plugin (ACF) – I’m trying to use the Add To Calendar plugin, where the <add-to-calendar-button> details are populated automatically based on the fields I have setup. For example – I have an ACF field called “event_date” – I’d like that entry to auto populate in the startDate field. I’ve tried this:

startDate=<?php echo the_field(‘event_date’); ?> – but this appears to break the code as the buttons no longer appear.

I’ve also tried this:

name=<? php echo the_title(); ?> – which seems to partially work, but it only shows the first word, if there is a space in the title anything after that doesn’t show up.

I’m hoping to make this work, but it may not be possible. I did post this question on stackoverflow, which shows my shortcode if that helps with more detail – https://stackoverflow.com/questions/76268092/add-to-calendar-button-plugin-and-shortcode

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer