ใส่ไว้ Line ไหนครับ ดำน้ำแย่แล้วfunction new_excerpt_more($more) {
global $post;
return ' <a href="'. get_permalink($post->ID) . '">Read the Rest...</a>';
}
add_filter('excerpt_more', 'new_excerpt_more');
---------------
โค้ดจาก wp-includes 3.1.3 ไฟล์ post-template.php/**
* Display the post excerpt.
* @since 0.71
* @uses apply_filters() Calls 'the_excerpt' hook on post excerpt.
*/function the_excerpt() {
echo apply_filters('the_excerpt', get_the_excerpt());
}
/**
* Retrieve the post excerpt.
* @since 0.71
* @param mixed $deprecated Not used.
* @return string
*/function get_the_excerpt( $deprecated = '' ) {
if ( !empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '2.3' );
global $post;
$output = $post->post_excerpt;
if ( post_password_required($post) ) {
$output = __('There is no excerpt because this is a protected post.');
return $output;
}
return apply_filters('get_the_excerpt', $output);
}
---------------------
โค้ดจาก theme ไฟล์ functions.phpfunction theme_add_admin() {
global $themename, $shortname, $options;
if ( $_GET['page'] == basename(__FILE__) ) {
if ( 'bmg_update' == $_REQUEST['action'] ) {
update_option('bmg_featured', $_REQUEST['bmg_featured']);
update_option('bmg_featured_count', $_REQUEST['bmg_featured_count']);
update_option('bmg_med_featured', $_REQUEST['bmg_med_featured']);
update_option('bmg_tab_sb', $_REQUEST['bmg_tab_sb']);
update_option('bmg_middle_sb', $_REQUEST['bmg_middle_sb']);
update_option('bmg_bottom_sb', $_REQUEST['bmg_bottom_sb']);
update_option('bmg_footer', $_REQUEST['bmg_footer']);
update_option('bmg_thumbnail', $_REQUEST['bmg_thumbnail']);
}
}
add_theme_page($themename." Options", "".$themename." Options", 'edit_themes', basename(__FILE__), 'theme_admin');
}
*------------------
โค้ดจาก theme ไฟล์ index.php <div class="story">
<?php if ( !get_option('bmg_thumbnail')) {?>
<?php get_thumbnail($post->ID); ?>
<?php } ?>
<?php the_excerpt();?>
</div>
<div class="tags"><small><?php the_tags( 'Tags: [', ', ', ']'); ?></small></div>
</div>