![]() |
Wordpres Help
On a custom category page how would you write:
Code:
if ($category->cat_ID == $this_category) |
Here's the syntax:
http://codex.wordpress.org/Function_...t_the_category |
Anyone know if there are any CATEGORY-SPECIFIC ad rotator plugins?
|
Quote:
<?php if ( is_category( 'CAT1') ): ?> <!-- Insert code for cat1 ad here --> CAT1 Code <?php elseif ( is_category( 'CAT2') ): ?> <!-- Insert code for cat2 ad here --> CAT2 Code <?php else: ?> <!-- Insert code for generic ad here --> Generic Ad Code <?php endif; ?> :upsidedow |
Quote:
|
Quote:
<link rel="stylesheet" href="<?php bloginfo('template_url')?>/default.css" type="text/css" /> <?php if( in_category( 1 ) ) { ?> <link rel="stylesheet" href="<?php bloginfo('template_url')?>/cat1.css" type="text/css" /> <?php } elseif ( in_category (2) ) { ?> <link rel="stylesheet" href="<?php bloginfo('template_url')?>/cat2.css" type="text/css" /> <?php } elseif ( in_category (3) ) { ?> <link rel="stylesheet" href="<?php bloginfo('template_url')?>/cat3.css" type="text/css" /> <?php } else { ?> <?php } ?> |
adsponsors plugin from coyotesdesigns will do category specific ad rotation
and its free |
Quote:
|
Quote:
Thats pretty long stuff there and I'd have to update it every time I added a new category. I got it to work a specific category ID: Code:
<?php |
Quote:
|
Quote:
Code:
echo get_category(get_query_var('cat'))->name; |
All times are GMT -7. The time now is 11:31 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123