Skip to content

Instantly share code, notes, and snippets.

@lawrencebrown
Last active March 21, 2020 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lawrencebrown/9195c1bdd20c2bd81dd0013a64585826 to your computer and use it in GitHub Desktop.
Save lawrencebrown/9195c1bdd20c2bd81dd0013a64585826 to your computer and use it in GitHub Desktop.
Gets the_field and stores its arrays, then echo inserts them using square brackets.
<?php $button = get_field('name_of_field'); ?>
<a href="<?php echo $button['url']; ?>"
target="<?php echo $button['target']; ?>">
<?php echo $button['title']; ?>
</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment