Hi, I am trying to display a text link using Custom Fields Pro. (I had this set up before, but my modification of the wp-single.php file seems to have been lost during an upgrade, even though it was in the child theme.) The code I have so far successfully displays the two text fields at the bottom of each post, but I can’t figure out how to turn one of the text fields into a link. I want to make the field [image_photographer] link to [photographer_url]. Thanks for your help.
Website: travelstudies.org
Wordpress: 4.9.8
X Theme: 6.2.5
Cornerstone: 3.2.5
Here’s the code I have so far:
<?php // ============================================================================= // VIEWS/ETHOS/WP-SINGLE.PHP // ----------------------------------------------------------------------------- // Single post output for Ethos. // ============================================================================= $fullwidth = get_post_meta( get_the_ID(), '_x_post_layout', true ); get_header(); ?> <?php while ( have_posts() ) : the_post(); ?>
<?php x_get_view( 'ethos', 'content', get_post_format() ); ?>
(Image: <?php the_field('image_title') ?>; Source: <?php the_field('image_photographer') ?>)
<?php x_get_view( 'global', '_comments-template' ); ?>
<?php endwhile; ?>
</div>
<?php if ( $fullwidth != 'on' ) : ?>
<?php get_sidebar(); ?>
<?php endif; ?>
</div>