is_category php query
-
I’ve not sure about some coding as I’m no expert in php. What I’m trying to do is show a post content if a category is say ‘exeter’. If it isn’t then I’m just having a full stop. I have the following code:
<?php if( is_category(‘exeter’) ) echo ”;
elseif( is_category(”) ) echo ‘.’;?>However within that echo” I can’t see how to use this kind of thing within the php:
<?php query_posts(‘p=96’); if(have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endif; ?>It needs re-writing I guess but not sure how; any help appreciated!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘is_category php query’ is closed to new replies.