Skip to content

Instantly share code, notes, and snippets.

@vfontjr
Last active December 14, 2018 09:25
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 vfontjr/85e82314c98146af3c90e1c3dd183e0e to your computer and use it in GitHub Desktop.
Save vfontjr/85e82314c98146af3c90e1c3dd183e0e to your computer and use it in GitHub Desktop.
Wrap entry-content in link
<?php
add_action( 'genesis_before_entry_content', 'vmf_before_entry_content', 5 );
function vmf_before_entry_content() {
$permalink = get_permalink();
echo '<a href="' . esc_url( $permalink ) . '" >';
}
add_action( 'genesis_after_entry_content', 'vmf_after_entry_content' );
function vmf_after_entry_content() {
echo '</a>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment