![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Apr 2002
Location: State Of Bliss
Posts: 2,438
|
Wordpres Help
On a custom category page how would you write:
Code:
if ($category->cat_ID == $this_category) |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
(>^_^)b
Industry Role:
Join Date: Dec 2011
Posts: 7,223
|
Here's the syntax:
http://codex.wordpress.org/Function_...t_the_category
__________________
![]() I've referred over $1.7mil in spending this past year, you should join in. ![]() ![]() I make a lot more money in the medical field in a lab now, fuck you guys. Don't ask me to come back, but do join Chaturbate in my sig, it still makes bank without me touching shit for years.. ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Jun 2012
Location: All Over
Posts: 3,917
|
Anyone know if there are any CATEGORY-SPECIFIC ad rotator plugins?
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
(>^_^)b
Industry Role:
Join Date: Dec 2011
Posts: 7,223
|
Nah, just code it manually:
<?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; ?> ![]()
__________________
![]() I've referred over $1.7mil in spending this past year, you should join in. ![]() ![]() I make a lot more money in the medical field in a lab now, fuck you guys. Don't ask me to come back, but do join Chaturbate in my sig, it still makes bank without me touching shit for years.. ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed User
Join Date: Apr 2002
Location: State Of Bliss
Posts: 2,438
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
(>^_^)b
Industry Role:
Join Date: Dec 2011
Posts: 7,223
|
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 } ?>
__________________
![]() I've referred over $1.7mil in spending this past year, you should join in. ![]() ![]() I make a lot more money in the medical field in a lab now, fuck you guys. Don't ask me to come back, but do join Chaturbate in my sig, it still makes bank without me touching shit for years.. ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Industry Role:
Join Date: Jun 2003
Location: My High Horse
Posts: 6,334
|
adsponsors plugin from coyotesdesigns will do category specific ad rotation
and its free
__________________
Mike South It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Industry Role:
Join Date: Jun 2012
Location: All Over
Posts: 3,917
|
Thank you so much, Mikesouth and Colmike7
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 | |
Confirmed User
Join Date: Apr 2002
Location: State Of Bliss
Posts: 2,438
|
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 $args=array( 'orderby' => 'name', 'order' => 'ASC' ); $categories=get_categories($args); foreach($categories as $category) { if ($category->cat_ID == '4') { echo '<p style="background-color:#eccad3;"><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View %s Links" ), $category->name ) . '" ' . '>' . $category->name.'</a> </p> '; } else { echo '<p><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View %s Links" ), $category->name ) . '" ' . '>' . $category->name.'</a> </p> '; } } ?> |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
(>^_^)b
Industry Role:
Join Date: Dec 2011
Posts: 7,223
|
Quote:
![]()
__________________
![]() I've referred over $1.7mil in spending this past year, you should join in. ![]() ![]() I make a lot more money in the medical field in a lab now, fuck you guys. Don't ask me to come back, but do join Chaturbate in my sig, it still makes bank without me touching shit for years.. ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 | |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 55,359
|
Quote:
Code:
echo get_category(get_query_var('cat'))->name;
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. ![]() WP Stuff |
|
![]() |
![]() ![]() ![]() ![]() ![]() |