Home Forums General Issues button with link field


button with link field

  • Am not sure if this is possible or not but I am looking for a really simple solution.

    I would like to create a custom field where I can insert a url of a link to an external site. I can do that, but I’d like to show a VIEW NOW button instead of a html link.

    Currently I’m using the WYSIWYG and coding the a href manually, but what would be perfect is to not have to code in the button but just assign the html link to it.

    Hope that makes sense.

  • okay, must have been the coffee but I’ve figured it out and thought to post her to share with anyone with the same need.

    I’ve wrapped the custom field php into a href link code…

    ” target=”_blank”>SHOP NOW

    Simple, and works!

  • <a href="<?php the_field('look_1_shop_now_link'); ?>" target="_blank">SHOP NOW</a>

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘button with link field’ is closed to new replies.