Skip to content

Commit

Permalink
UPD: prevent search results broke
Browse files Browse the repository at this point in the history
  • Loading branch information
MjHead committed Sep 22, 2017
1 parent 78b39c0 commit 6384bec
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion assets/sass/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Theme URI: http://underscores.me/
Author: Wapuula team
Author URI: http://wapuula.com
Description: wapuula.com theme
Version: 2.0.18.1
Version: 2.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wapu
Expand Down
12 changes: 12 additions & 0 deletions inc/hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,3 +322,15 @@ function wapu_set_blog_main_template( $template ) {
return $template;

}

add_filter( 'excerpt_length', 'wapu_excerpt_length', 999 );

function wapu_excerpt_length( $length ) {
return 30;
}

add_filter( 'excerpt_more', 'wapu_excerpt_more' );

function wapu_excerpt_more( $more ) {
return ' ...';
}
2 changes: 1 addition & 1 deletion style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions template-parts/content-search.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@

<div class="content_wrapper">
<div class="entry-content">
<?php wapu()->utility()->attributes->get_content( array(
'length' => 32,
'content_type' => 'post_excerpt',
'echo' => true,
) ); ?>
<?php echo get_the_excerpt(); ?>
</div><!-- .entry-content -->
<div class="footer_wrapper">
<div class="entry-meta">
Expand Down

0 comments on commit 6384bec

Please sign in to comment.