![]() |
![]() |
![]() |
||||
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 |
Such Fun!
Industry Role:
Join Date: Feb 2008
Posts: 13,900
|
Which WP function do I need to display certain things includes on the main page only?
I've got a few things I have added into my site. That are using <?php include> tags.
One is in sidebar.php / one is in footer.php etc. Problem is I only want to display these includes on the main page. What's the best way to do it? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 | |
Confirmed User
Industry Role:
Join Date: Mar 2004
Location: Great White North
Posts: 5,794
|
Quote:
PHP Code:
PHP Code:
Here's a good way to pick out certain categories (for picking out and advertising only gay sites on gay/tranny as per this example) PHP Code:
__________________
LinkSpun - Premier Adult Link Trading Community - ICQ - 464/\281/\250 Be Seen By New Webmasters/Affiliates * Target out webmasters/affiliates based on niches your sites are for less than $20 a month. AmeriNOC - Proudly hosted @ AmeriNOC! |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Such Fun!
Industry Role:
Join Date: Feb 2008
Posts: 13,900
|
Thanks J
![]() I remember you posting something about it before, but couldn't find the thread. This should work perfectly |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Such Fun!
Industry Role:
Join Date: Feb 2008
Posts: 13,900
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Industry Role:
Join Date: Aug 2002
Location: USA
Posts: 6,721
|
Have any of you guys seen a plugin that will let you put links only in certain categories? I looked real quick the other day but didn't see anything.
__________________
icq 156131086 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Confirmed User
Industry Role:
Join Date: Mar 2004
Location: Great White North
Posts: 5,794
|
Quote:
PHP Code:
__________________
LinkSpun - Premier Adult Link Trading Community - ICQ - 464/\281/\250 Be Seen By New Webmasters/Affiliates * Target out webmasters/affiliates based on niches your sites are for less than $20 a month. AmeriNOC - Proudly hosted @ AmeriNOC! |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Such Fun!
Industry Role:
Join Date: Feb 2008
Posts: 13,900
|
Ok it definately works. but wouldn't work with a php include unless I done it wrong.
Here is what i tried below: <?php wp_reset_query(); if (is_home() ) { echo '<?php include "/include.html"; ?>'; } ?> Unless I have to put the full file location in there. will try that now. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Available for Coding Work
Industry Role:
Join Date: Jun 2008
Posts: 1,432
|
Code:
<?php wp_reset_query(); if (is_home() ) { include "/include.html"; } ?>
__________________
<developer> MechBunny ![]() ![]() Email: vlad [at] faxite.com Telegram: @dangerouscoding |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 | |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 55,220
|
Quote:
Code:
<?php if ( is_home() ) : ?> <?php include (TEMPLATEPATH . '/include.html'); ?> <?php endif ; ?>
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. ![]() WP Stuff |
|
![]() |
![]() ![]() ![]() ![]() ![]() |