Dynamically Insert a Custom Field into a Shortcode
-
Hi there,
I am trying to dynamically insert a custom field (course ID) into a shortcode.
The shortcode is as follows
[learndash_payment_buttons course_id=”INSERT”]
I am using a custom field to insert course ID for each page and the usual way to call the custom field is:
<?php getCustomField(‘Course ID’); ?>
Does anyone know if it is possible to combine the two so I can dynamically call the course ID within the shortcode?
I have tried a few approaches but nothing seems to work.
Thanks in advance.
James
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Dynamically Insert a Custom Field into a Shortcode’ is closed to new replies.