Help with <?php if ( is_category() ) : ?> function
-
I want to put inside category.php a different template for each category I have in my WP, instead of having a category-#.php for each one. But I was reading in the codex the Custom Category Templates page, and I don?′t understand too much on that page.
I don?′t think that?′s is the correct way:
<?php if ( is_category('1') ) : ?>
[template code here]
<?php endif; ?>
<?php if ( is_category('2') ) : ?>
[template code here]
<?php endif; ?>
<?php if ( is_category('3') ) : ?>
[template code here]
<?php endif; ?>...[/code]Someone can help to make it work in a proper way?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Help with <?php if ( is_category() ) : ?> function’ is closed to new replies.