We have purchased the WPDM – Advanced Custom Fields plugin and are atempting to add another button to the link-template default template. It works fine when I add the shortcode as such as click here. But if the link does not exist I do not want to show the button. So I tried this :
$l= trim(do_shortcode(‘[acf_AnotherDownload_buttonlink]’));
if( $l != ”){
echo’ Online Form‘;
}
This does not work. I also see there is a php snippet we could used
<?php echo wpdm_acf([ID],’AnotherDownload/buttonlink’); ?>, however to use this you need to id of the download and as mentioned elsewhere in this forum, get_the_id() does not work. I played around trying to get the current download id inside of the template, but was unable to get it in any reliable manner.
So is there a way i can use conditionals inside of template with the ACF shortcodes, or is there a way I can get the current id of the download inside of the template?
thanks
Ken
-
This topic was modified 4 years ago by
ken nawrocki. Reason: add code tags