我在wordpress theme
的function.php
寫了這個代碼:添加功能,以特定的WordPress頁面
remove_filter('get_the_excerpt', 'wp_trim_excerpt');
add_filter('get_the_excerpt', 'wpse_custom_wp_trim_excerpt');
function wpse_excerpt_length($length) {
return 40;
}
add_filter('excerpt_length', 'wpse_excerpt_length', 999);
我如何可以加載這個代碼只對特定的WordPress頁面,在特定頁面-ID 5580?
謝謝