• I have a site set up with a couple different categories, on being a category for press releases and the other for blog posts. Well I’m running in a bit of a problem in the single.php page.

    I want visitors to be able to post comments on the blog post but not on the press releases and there is other meta data that needs to show when someone is viewing a blog post or a press release “post.”

    I figured the best way to do this was using the Conditional tags but this is where I’m running into my trouble. Here is the code I’m trying to work with for the meta data change:

    <?php
    	if (is_category(blog)){
        	echo=<p class="meta"><?php the_date(); ?>
    ;
        } else {
        		//Do nothing;
        }
        ?>

    1st off this code doesn’t work, so what did I mess up? And is this the easiest way to go about something like this or should I be doing it other way?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Conditional Tags’ is closed to new replies.