Last active
December 12, 2015 09:39
-
-
Save JoeHana/4752979 to your computer and use it in GitHub Desktop.
Adds the possibility to have post-type independent read more text labels
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 | |
/** | |
* 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