Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

markross67 on "Trying to make my Category Array work"

$
0
0

Hello,
In a previous template, I have a bit of code using a category array, and some conditional statements. I would like to do something similar with my current Template: Twenty Twelve (Child), but I'm not having much luck making it work.

I would like to include this code in my content.php file:

if ( in_category( array('Political Cartoons', 'Political Statements' ) )) {

<?php the_time('F jS, Y') ?>

elseif ( in_category( array('Scripture', 'Biblical', 'Biblical Resources', 'Quotes', 'Holidays/Anniversaries', 'Article', 'Political', 'Political Literature', 'Political Terms', 'Admin') )) {

Posted by <?php the_author_posts_link(); ?> | <?php the_time('F jS, Y') ?>

else {

Written by <?php the_author_posts_link(); ?> | <?php the_time('F jS, Y') ?>

endif;

The problem is, I'm not sure how to make all of the condition statements work correctly. If someone could help me tweak it so that it will work correctly, I would really appreciate it.


Viewing all articles
Browse latest Browse all 8245

Trending Articles