how to use function single_cat_title()
-
I want to show current category title
I found this page
http://codex.wordpress.org/Function_Reference/single_cat_title<p><?php single_cat_title('Currently browsing '); ?>.</p>Currently browsing WordPress.
I try this
if(is_category()){ $page_title = __("Category Archives :",'obandes'); $page_title = $page_title.single_cat_title('', false); //ok echo Category Archives : WordPress $page_title = single_cat_title($page_title, false); //bad echo WordPress } printf('<div class="h1" id="archives-title">%s</div>',esc_html($page_title));I am search other example.
find twentyten category.php
<h1 class="page-title"><?php printf( __( 'Category Archives: %s', 'twentyten' ), '<span>' . single_cat_title( '', false ) . '</span>' ); ?></h1>Is this only my ploblem?
why I have not good result?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘how to use function single_cat_title()’ is closed to new replies.