Jump to content
Sign in to follow this  
heroescourse

Hook to get category names to show up as headers for pages?

Recommended Posts

john_kaufman

I'm trying to do this using functions.php but must be missing something??

add_action('pagelines_inside_top_theloop','cat_title');
	
		function cat_title(){?>
		 	monkeys
	               <?php if (is_category('eWeek Security Alerts')):?>
	       		<h1 class="title">ponies</h1>
			<?php endif;
		}	

I get monkeys, but no ponies :-) I've tried with & without quotes on titles, slugs and IDs. From what I've read the is_category() only works outside the loop... functions.php operates inside the loop, correct? Any help is appreciated.

Share this post


Link to post
Share on other sites
john_kaufman

Disregard - I misunderstood where this shows up (dunce cap please)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×