Skip to content

Instantly share code, notes, and snippets.

@webmasterninjay
Created March 31, 2015 18:42
Show Gist options
  • Save webmasterninjay/fa5039fe2ccfa44a5e5f to your computer and use it in GitHub Desktop.
Save webmasterninjay/fa5039fe2ccfa44a5e5f to your computer and use it in GitHub Desktop.
Genesis Theme: Edit read more link on cpt archive
<?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