| Server IP : 14.225.204.176 / Your IP : 216.73.216.252 Web Server : nginx/1.24.0 System : Linux nodejs-ybgk 6.8.0-40-generic #40-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 5 10:34:03 UTC 2024 x86_64 User : root ( 0) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/html/php/langngon.com/wp-content/themes/langngon/lib/ |
Upload File : |
<?php
/**
* Clean up the_excerpt()
*/
function excerpt_length_medium( $length ) {
return 20;
}
function excerpt_length_long( $length ) {
return 40;
}
function roots_excerpt_more($more) {
return ' … <p><a class="read-more" href="' . get_permalink() . '">' . __('Read more', 'langngon') . ' <span class="glyphicon glyphicon-chevron-right"></span></a></p>';
}
function roots_excerpt_hellip($more) {
return ' …';
}
function custom_excerpt() {
if ( is_category() ) {
add_filter('excerpt_more', 'roots_excerpt_more');
add_filter( 'excerpt_length', 'excerpt_length_long', 999 );
} else {
add_filter('excerpt_more', 'roots_excerpt_hellip');
add_filter( 'excerpt_length', 'excerpt_length_medium', 999 );
}
}
//add_action( 'pre_get_posts', 'custom_excerpt' );
/**
* Manage output of wp_title()
*/
function roots_wp_title($title) {
if (is_feed()) {
return $title;
}
$title .= get_bloginfo('name');
return $title;
}
add_filter('wp_title', 'roots_wp_title', 10);