-
-
Save billerickson/af57c5b9240c7923504aaecd915bb531 to your computer and use it in GitHub Desktop.
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
<?php | |
/** | |
* Back to Portfolio Link | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/genesis-portfolio/#comment-670383 | |
*/ | |
function be_back_to_portfolio_link() { | |
// Only run on single portfolio items | |
if( ! is_singular( 'portfolio' ) ) | |
return; | |
echo '<p><a href="' . get_post_type_archive_link( 'portfolio' ) . '">Back to Portfolio</a></p>'; | |
} | |
add_action( 'genesis_entry_content', 'be_back_to_portfolio_link', 20 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment