Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Center area post/pages (http://forum.bytesforall.com/forumdisplay.php?f=32)
-   -   [SOLVED] How to: display category name on category pages (http://forum.bytesforall.com/showthread.php?t=12956)

wittyusername Feb 23, 2011 01:08 PM

[SOLVED] How to: display category name on category pages
 
i though it would be there by default, but nope. not there.

I tried adding <h1>Category: %category%</h1> to KICKER: Multi Post Pages but it added it to the top of every article on my category page.

I'd like to do the same thing for tag pages as well.

wittyusername Feb 23, 2011 02:20 PM

I went with this in my index.php file but i'd rather not hack core. is there a better solution?

Code:

<?php # error_reporting(-1);
list($bfa_ata, $cols, $left_col, $left_col2, $right_col, $right_col2, $bfa_ata['h_blogtitle'], $bfa_ata['h_posttitle']) = bfa_get_options();
get_header();
extract($bfa_ata);

?>
<?php if ( is_category() ) { ?><h3 style="margin: 0.2em 0;">Category: <?php single_cat_title(''); ?></h3><?php } ?>
<?php if ( is_tag() ) { ?><h3 style="margin: 0.2em 0;">Tag: <?php single_tag_title(''); ?></h3><?php } ?>


juggledad Feb 24, 2011 05:54 AM

just add that to ato->Style & edit CENTER COLUMN->Content ABOVE the LOOP
HTML Code:

if( is_category() ) { ?><h3 style="margin: 0.2em 0;">Category: <?php single_cat_title(''); ?></h3><?php };

wittyusername Feb 25, 2011 06:25 AM

Dang. SO obvious now. Thank you!


All times are GMT -6. The time now is 08:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.