Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter('the_content', 'hcode_trim_excerpts');
- if ( ! function_exists( 'hcode_trim_excerpts' ) ) {
- function hcode_trim_excerpts($content = false) {
- global $post;
- //ADDING HERE A FURTHER CHECK !has_wpv_wp_archive() is solving the issue. TS NOTE.//
- if( !is_singular() && !is_admin()){
- //THIS IS THE PROBLEM LINE, where H-Code replaces THE Content with excerpt. TS NOTE.//
- $content = $post->post_excerpt;
- // If an excerpt is set in the Optional Excerpt box
- if( $content ) {
- $content = apply_filters('the_excerpt', $content);
- } else {
- $content = $post->post_content;
- }
- }
- $content = str_replace( "|br|", "<br>", $content );
- // Make sure to return the content
- return $content;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement