Anonim / 1 year, 9 months ago | Download | Plaintext | Odpowiedz |

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
// wyswietl x pierwszych slow w ciagu znakow

function wordlimit($string, $length = 50, $ellipsis = "...")
			{
   				$words = explode(' ', $string);
   				if (count($words) > $length)
       			return implode(' ', array_slice($words, 0, $length)) . $ellipsis;
   				else
				return $string;
			} 

add_filter('the_content', 'skroc_glowna'); function skroc_glowna($content) {
global $post;
if (!is_home()) {
return $content;
}
else {
$content = ($content, '10');
return $content;
}
}