カスタムフィールドの文字数を制限
<?php
$pattern = '/(^.{8})(.+)/u';
$subject = post_custom('shozichi_bp');
$matches = array();
preg_match($pattern, $subject , $matches);
if ($matches[2] != '') {
$out = $matches[1] . '';
} else {
$out = $subject;
}
echo($out);
?>