Way to dynamicaly generate values within shortcode?
-
Hi,
I got trouble using some complex custom shortcodes. I’m using ACF for custom user-profile-content (e.g. phone number). Now, to load these values into the form, I need to add the current user’s ID within the ACF’s shortcode. Example:
<label>phone: [dynamictext* phone "acf field='field_phone' post_id='user_X'"]</label>
where inuser_X
theX
should be the actual user’s ID.My recent idea was to do the math in another shortcode, so give the
"acf field='field_phone' post_id='user_X'"
to another custom shortcode returning a calculated shortcode (e.g."acf field='field_phone' post_id='user_1'"
), that will be used by CF7. Will that be possible, as it’s like a iterated shortcode?Is there a easier way to achieve the task?
Thanks in advance!
- The topic ‘Way to dynamicaly generate values within shortcode?’ is closed to new replies.