diff --git a/caixes.php b/caixes.php index 2754109..cb0acaa 100644 --- a/caixes.php +++ b/caixes.php @@ -5,78 +5,84 @@ -
@@ -97,60 +103,66 @@ - - + + +
- ID) . '">[...]') - ?> -
+ ++ ID) . '">[...]') + ?> +
+'); //write tags allowed + $excerpt_length = 55; + $words = explode(' ', $text, $excerpt_length + 1); + if (count($words)> $excerpt_length) { + array_pop($words); + array_push($words, '[...]'); + $text = implode(' ', $words); + } + } + return $text; +} +add_filter('get_the_excerpt', 'hangar_html_excerpt'); +/** + * Filter the except length to 20 words. + * https://developer.wordpress.org/reference/functions/the_excerpt/#comment-325 + * @param int $length Excerpt length. + * @return int (Maybe) modified excerpt length. + */ +function hangar_custom_excerpt_length( $length ) { + return 10; +} +add_filter( 'excerpt_length', 'hangar_custom_excerpt_length', 999 ); + + //afegir estils a l'editor /* Custom CSS styles on WYSIWYG - Start diff --git a/style.css b/style.css index d071335..4e833c6 100644 --- a/style.css +++ b/style.css @@ -797,7 +797,7 @@ span.cat a{text-transform: uppercase; letter-spacing:normal} .boxentry .curt, .boxentry p.excerptbox {max-height: 5.6rem; height: auto/*60px*/; font-size:11.5px;} .boxentry .mig {height: 195px;} .boxentry .llarg {height: 225px;} -.boxentry .plus {height: 331px;} +.boxentry .plus {height:327px;/*height: 331px;*/} .boxentry .plus p{display:inline;} /* special setting for showing excerpt image */