function excerpt($count) { $excerpt = explode(' ', get_the_excerpt(), $count); if (count($excerpt)>=$count) { array_pop($excerpt); $excerpt = implode(" ",$excerpt).'...'; } else { $excerpt = implode(" ",$excerpt); } $excerpt = preg_replace('`\<<^\>>*\>`','',$excerpt); return $excerpt;}
<?php echo excerpt(xx); ?>
function get_excerpt(){$excerpt = get_the_content();$excerpt = preg_replace(" (\<.*?\>)",'',$excerpt);$excerpt = strip_shortcodes($excerpt);$excerpt = strip_tags($excerpt);$excerpt = substr($excerpt, 0, 40);$excerpt = substr($excerpt, 0, strripos($excerpt, " "));$excerpt = trim(preg_replace( '/\s+/', ' ', $excerpt));$excerpt = $excerpt.'... <a href="'.$permalink.'">more</a>';return $excerpt;}
<?php echo get_excerpt(); ?>
function excerpt($limit) { $excerpt = explode(' ', get_the_excerpt(), $limit); if (count($excerpt)>=$limit) { array_pop($excerpt); $excerpt = implode(" ",$excerpt).'...'; } else { $excerpt = implode(" ",$excerpt); } $excerpt = preg_replace('`\<<^\>>*\>`','',$excerpt); return $excerpt;} function content($limit) { $content = explode(' ', get_the_content(), $limit); if (count($content)>=$limit) { array_pop($content); $content = implode(" ",$content).'...'; } else { $content = implode(" ",$content); } $content = preg_replace('/\<.+\>/','', $content); $content = apply_filters('the_content', $content); $content = str_replace('>>>', '>>>', $content); return $content;}
<?php echo excerpt(25); ?>
function get_excerpt($count){ $permalink = get_permalink($post->ID); $excerpt = get_the_content(); $excerpt = strip_tags($excerpt); $excerpt = substr($excerpt, 0, $count); $excerpt = substr($excerpt, 0, strripos($excerpt, " ")); $excerpt = $excerpt.'... <a href="'.$permalink.'">more</a>'; return $excerpt;}
<?php echo get_excerpt(125); ?>
โปรดรอ
cymiz.com insurance