0

動的なメタ タイトルで 1 つの単語を大文字にする方法はありますか?

基本的にメタ タイトルにスラッグを使用していますが、小文字です。その単語だけを大文字にしたいのですが、これを行う最善の方法がわかりませんか?

<title><?php $taxonomy = 'propertytype'; $queried_term = get_query_var($taxonomy);$term = get_term_by( 'slug', $queried_term, $taxonomy ); echo $term->slug; ?> the rest of the thitle goes here</title>

タイトルのスラッグを大文字にする方法はありますか?

どうもありがとう

ポール

4

1 に答える 1

0
<?php
$taxonomy = 'propertytype';
$queried_term = get_query_var($taxonomy);
$term = get_term_by( 'slug', $queried_term, $taxonomy );
$cap = ucwords($term->slug);
?>
<title><?=$cap?>the rest of the thitle goes here</title>
于 2012-04-30T13:17:23.440 に答える