Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created April 20, 2016 14:17
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 billerickson/af57c5b9240c7923504aaecd915bb531 to your computer and use it in GitHub Desktop.
Save billerickson/af57c5b9240c7923504aaecd915bb531 to your computer and use it in GitHub Desktop.
<?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