Kategorie
wordpress

wp_list_pages_excludes – filtr wykluczający strony z wyników wp_list_pages

Filtr wykluczający strony z wyników wp_list_pages:

function wp_list_pages_exclude_hidden($exclude_array){
    $exclude_array[] = 3692;
    return $exclude_array;
}
add_filter('wp_list_pages_excludes', 'wp_list_pages_exclude_hidden');
Kategorie
wordpress zapiski

Zmiana domyślnej długości wypisu

Obcięcie domyślnej długości wypisu do 35 słów:

function custom_excerpt_length( $length ) {
	return 35;
}
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );

Za: codex.wordpress.org