I have a custom field set in my theme (shop_url) set up so that it uses the URL set by the custom field to direct a viewer who clicks on the button to the proper site to purchase a product, but the label on this button is currently static. The coding looks like this:
<?php $shop_url = get_post_meta($post->ID, 'shop_url', true); ?>
<div class="clearfix">
<center><?php if ($et_price <> '') { ?>
<span class="price-single"><span><?php echo esc_html($et_price); ?></span></span>
<a href="<?php echo $shop_url; ?>" class="addto-cart"><span><?php esc_html_e('Try It!'); ?></span></a>
<?php }; ?></center>
</div>
I was wondering if there was to change the "Try It!" text to something more variable, IE the domain name of the link set in the shop_url field, or something like that, just so that A) the user knows where they're going, and B) I don't have to do something like create a custom field & retroactively add that field manually to all of my existing posts.