![]() |
![]() |
![]() |
||||
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 |
(felis madjewicus)
Industry Role:
Join Date: Jul 2006
Location: In Mom & Dad's Basement
Posts: 20,368
|
Calling Wordprss genius's again! Conditional includes on category page 1?
I understand how to do a conditional include to display on many different pages, but I would like to have an included div associated to each category on my site. That's easy enough, but I would like that condition to include that the div should only be included on THE FIRST PAGE of the category display.
Is that doable, or will my included div only be able to show on each page of the category listing? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 55,233
|
not sure if you want an include or what, but you want to use the variable is_paged()
Code:
<?php if (is_category() && !is_paged()) { ?> <div class="stuff"> blah blah </div> or <?php include (TEMPLATEPATH . '/showdiv.html'); ?> <?php } ?>
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. ![]() WP Stuff |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 | |
(felis madjewicus)
Industry Role:
Join Date: Jul 2006
Location: In Mom & Dad's Basement
Posts: 20,368
|
Quote:
I'll google the is_paged() variable now and see what it has to say. Never used it before. Might work. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 55,233
|
if you wanted to do an automated msg with the cat name you would do something like this.
Code:
<?php if (is_category() && !is_paged()) { ?> <?php $catid = get_query_var('cat'); ?> <?php $catname = get_cat_name($catid);?> <div class="message"> welcome to the archives for <?php echo $catname;?> </div> <?php } ?>
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. ![]() WP Stuff |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
(felis madjewicus)
Industry Role:
Join Date: Jul 2006
Location: In Mom & Dad's Basement
Posts: 20,368
|
cheers, thanks again fris
|
![]() |
![]() ![]() ![]() ![]() ![]() |