有没有办法在动态元标题中将一个单词大写?
基本上我在元标题中使用了一个slug,但它是小写的。 我想将这个词大写,但我不确定最好的方法是什么?
<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>
有没有办法将标题中的slug大写?
非常感谢
保罗
<?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>