Last active
April 1, 2018 14:04
-
-
Save braddalton/abe7cbe26f59f47c4cfe02fbc602fd08 to your computer and use it in GitHub Desktop.
Add Button With Unique Link To Entries On Archive Pages https://wp.me/p1lTu0-hqu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'genesis_entry_content', 'add_button_after_archive_entry', 15 ); | |
function add_button_after_archive_entry() { | |
if ( ! is_single() && genesis_get_custom_field( 'link' ) ) | |
printf( '<a class="button" href="%s">' . __( 'Buy Now' ) . '</a>', genesis_get_custom_field( 'link' ) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment