//スラッグを取得する
function the_slug($echo=true){
$slug = basename(get_permalink());
do_action(‘before_slug’, $slug);
$slug = apply_filters(‘slug_filter’, $slug);
$slugarr = explode(‘.’,$slug);
if( $echo ) echo $slugarr[0];
do_action(‘after_slug’, $slugarr[0]);
return $slugarr[0];
}