Remove last character in get_post_meta
This is more of a PHP question then a WordPress question. If you want to remove punctuation marks like (.,-;:) you can try this recursive version: $s = get_post_meta( $post->ID, ‘one_line_summary’, TRUE ); if( function_exists( ‘remove_punctuation_marks’ ) ) $s = remove_punctuation_marks( $s ); with /** * Remove punctuation marks (.,-;:) if they’re the last characters … Read more