Getting Image ID from custom field values
-
Hey:
Your plug-in is working well for me but I do have one question:
I have a custom post type where images are uploaded specifically for the creation of before & afters, so the image IDs are stored in custom fields.
Normally the way we grab these us by doing something like
<?php the_field('before_image'); ?>
Additionally, we’re building this into a theme or template, so when we use your shortcode we’re doing something like
<?php echo do_shortcode( '[twenty20 img1="#" img2="#" direction="horizontal" offset="0.5" align="right" width="100%" before="Before" after="After" hover="false"]' ); ?>
So the question is how might I go about populating the img1 and img2 values with data from custom fields? Can you recommend a way to get this done?
Your time and consideration is much appreciated. ??
- The topic ‘Getting Image ID from custom field values’ is closed to new replies.