Skip to content

Instantly share code, notes, and snippets.

@JoeHana
Last active December 12, 2015 09:39
Show Gist options
  • Save JoeHana/4752979 to your computer and use it in GitHub Desktop.
Save JoeHana/4752979 to your computer and use it in GitHub Desktop.
Adds the possibility to have post-type independent read more text labels
<?php
/**
* Custom more text depending on post type
*/
add_filter('wpcasa_more_text', 'custom_more_text');
function custom_more_text($text) {
if('property'== get_post_type() ) {
$text = __('View Villa', 'wpcasa');
} else {
$text = __('Read More', 'wpcasa');
}
return $text;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment