I use an extension called Custom Field Suite to import info from a csv in order to batch create posts. In order to display the form fields I use <?php echo CFS()->get('image_location'); ?>
One type of information I import is image sources which I display images using <img src="<?php echo CFS()->get('image_location'); ?>" class="preview" alt="image thumbnail" />
This works great without any problems.
But, I want the images to link to the next post using next_post_link
. I've seen <?php next_post_link('%link','<img src="IMAGELINK"/>'); ?>
but I can't quite figure out how to combine the two bits of php into a whole.
I've tried <?php next_post_link('%link','<img src="echo CFS()->get('image_location')"/>'); ?>
but get a syntax error. Any advice would be helpful.