Created
March 31, 2015 18:42
-
-
Save webmasterninjay/fa5039fe2ccfa44a5e5f to your computer and use it in GitHub Desktop.
Genesis Theme: Edit read more link on cpt archive
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 | |
// Edit read more link on certain cpt archive | |
add_filter( 'get_the_content_more_link', 'chloe_read_more_link' ); | |
function chloe_read_more_link() { | |
if ( is_post_type_archive( 'food-recipes' ) ) { | |
return '<p class="text-center"><a class="button get-recipe" href="' . get_permalink() . '">Get The Recipe Here</a></p>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment