Hi @talentoracle,
The run-together of the location/date and excerpt in the list of press release posts is a bug. Our latest version fixes this issue, however it is currently NOT released publicly yet.
Below I have provided the immediate fix. You will have to add the following to your functions.php
file:
add_filter( 'get_the_excerpt', 'my_nooz_press_release_excerpt', 10, 2 );
function my_nooz_press_release_excerpt( $output, $post ) {
if ( 'nooz_release' == $post->post_type ) {
$length = apply_filters( 'excerpt_length', 55 );
$ending = apply_filters( 'excerpt_more', ' ' . '[…]' );
$output = ! empty( $post->post_excerpt ) ? $post->post_excerpt : wp_trim_words( $post->post_content, $length, $ending );
}
return $output;
}
Additionally add the following if you would also like to have the location/date in the excerpts.
add_filter( 'get_the_excerpt', 'my_nooz_press_release_excerpt_with_location_and_date', 10, 2 );
function my_nooz_press_release_excerpt_with_location_and_date( $output, $post ) {
if ( 'nooz_release' == $post->post_type ) {
$location = get_option( 'mdnooz_release_location' );
$date_format = get_option( 'mdnooz_release_date_format' ) ? wp_kses_data( strip_tags( get_option( 'mdnooz_release_date_format' ) ) ) : get_option( 'date_format' );
$date = get_the_date( $date_format );
$output = $location . '—' . $date . ' ' . $output;
}
return $output;
}
-
This reply was modified 6 years, 9 months ago by
farinspace. Reason: text edits