Created
August 20, 2012 22:03
-
-
Save JustinSainton/3408345 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function avr_replace_title_with_meta( $title, $id ) { | |
$type = get_post_type(); | |
if ( in_array( $type, array( 'property', 'rate' ) ) ) | |
$title = get_post_meta( $id, 'avr_' . $type . '_title', true ); | |
return $title; | |
} | |
add_filter( 'the_title', 'avr_replace_title_with_meta', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment