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.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 04-18-2007, 05:42 PM   #1
clickhappy
Confirmed User
 
Industry Role:
Join Date: Mar 2004
Posts: 4,027
Programmers: can you do this in Wordpress?

Right now the sidebars in my Wordpress blog are all static.
So if someone is on the anal page, they'll see the exact same side bars as if theyre on the cumshot page, the tranny page, the ebony page, etc.

Is there any way I can make it dynamic? So when someone is on the ebony page it shows some ebony banners in my sidebars? And when someone is on the anal page it shows anal banners on the sidebars?

In the url it does say www.mysite.com/anal, www.mysite.com/ebony etc.
So maybe theres a way to pull the category name from the url and have it so that whatever category is showing in the url, will show the approriate banner in the url.

Anyone know how to do this?
clickhappy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-18-2007, 05:48 PM   #2
k0nr4d
Confirmed User
 
k0nr4d's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,229
Im not sure how wordpress passes in its categories but you could put something along the lines of this in your template
Code:
<?
$category = $_GET[category]; //not sure about this part, might need to explode(); the url and use the last value in the array, as i said i dont know how this is put together in wordpress exactly. 
if($category == 'anal') { echo "html code for anal banner"; } 
elseif($category == 'ebony') { echo "html code for ebony"; } 
else { echo "no matches, generic banner html"; }
?>
k0nr4d is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-18-2007, 05:49 PM   #3
clickhappy
Confirmed User
 
Industry Role:
Join Date: Mar 2004
Posts: 4,027
Quote:
Originally Posted by k0nr4d View Post
Im not sure how wordpress passes in its categories but you could put something along the lines of this in your template
Code:
<?
$category = $_GET[category]; //not sure about this part, might need to explode(); the url and use the last value in the array, as i said i dont know how this is put together in wordpress exactly. 
if($category == 'anal') { echo "html code for anal banner"; } 
elseif($category == 'ebony') { echo "html code for ebony"; } 
else { echo "no matches, generic banner html"; }
?>
Aweosme, im going to try that

Thank you!
clickhappy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-18-2007, 05:56 PM   #4
Jace
FBOP Class Of 2013
 
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
yup, what he said above, just tell wordpress to check the category before it pulls the sidebar, then it loads a certain sidebar for that category

you can tell it multiple sidebar.php file, and then just duplicate the sidebar.php in your ftp for each sidebar you need
Jace is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-18-2007, 06:26 PM   #5
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,111
Quote:
Programmers: can you do this in Wordpress?
Yes, I can.













Next question please
__________________
All cookies cleared!
sarettah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-19-2007, 03:39 AM   #6
clickhappy
Confirmed User
 
Industry Role:
Join Date: Mar 2004
Posts: 4,027
I cant get that to work correctly.
clickhappy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-19-2007, 04:49 AM   #7
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,372
this is some serious business
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-19-2007, 05:08 AM   #8
BigBen
Confirmed User
 
Join Date: Nov 2004
Location: scv
Posts: 2,299
http://codex.wordpress.org/Conditional_Tags
BigBen is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-19-2007, 05:16 AM   #9
Ace_luffy
www.creationcrew.com
 
Ace_luffy's Avatar
 
Industry Role:
Join Date: Feb 2005
Location: CREATIONCREW.COM CREATIONCREW.COM CREATIONCREW.COM CREATIONCREW.COM CREATIONCREW.COM CREATIONCREW.COM
Posts: 12,110
serious ....
__________________


++ Adult and Mainstream Websites Designs | 10 banners for only $50 | html5 Banners ++
email : [email protected] Telegram : https://t.me/creationcrew | HTML5/Responsive Site - Div/CSS - ElevatedX - NATs - Wordpress

Ace_luffy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-19-2007, 05:35 AM   #10
Nicky
Confirmed User
 
Nicky's Avatar
 
Industry Role:
Join Date: Mar 2003
Location: Sweden
Posts: 30,069
I want wordpress to load niche specific link trades in the side bar for each category and full list of link trades on main page, can it do that?
__________________

gfynicky @ gmail.com
Nicky is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-19-2007, 06:04 AM   #11
beta-tester
Rock 'n Roll Baby!
 
Join Date: Sep 2004
Location: USA, temporarly
Posts: 22,562
you can use is_category() function and the combine it with conditional tag....for example if(is_category('teen')) { whatever; }
__________________

Sig for sale. Affordable prices. Contact me and get a great deal ;)

My contact:
ICQ: 944-320-46
e-mail: manca {AT} HotFreeSex4All.com
beta-tester is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-19-2007, 10:00 AM   #12
clickhappy
Confirmed User
 
Industry Role:
Join Date: Mar 2004
Posts: 4,027
I just can't code.
How much would it cost to hire a programmer to do this for me?
clickhappy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-19-2007, 10:21 AM   #13
scouser
marketer.
 
Industry Role:
Join Date: Aug 2006
Location: bcn
Posts: 2,280
ok, lets say you've got 3 categories,
babe
lesbian
black

this is untested, but should work ...

PHP Code:
<?php
if (is_category('babe')) {
?>
<a href="#"><img src="yourbabeadvert.jpg" alt="" /></a>
<?php
}

if (
is_category('lesbian')) {
?>
<a href="#lesbian"><img src="yourlesbianadvert.jpg" alt="" /></a>
<?php
}


if (
is_category('black')) {
?>
<a href="#black"><img src="yourblackadvert.jpg" alt="" /></a>
<?php
}

?>
As said, http://codex.wordpress.org/Conditional_Tags is where you want to look. Hit me up over icq if you need help. Note- that will display the ad when viewing just the category page itself. To display it when viewing a post in category x, use in_category()

Last edited by scouser; 04-19-2007 at 10:23 AM..
scouser is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-19-2007, 10:28 AM   #14
clickhappy
Confirmed User
 
Industry Role:
Join Date: Mar 2004
Posts: 4,027
Quote:
Originally Posted by deadmoon View Post
ok, lets say you've got 3 categories,
babe
lesbian
black

this is untested, but should work ...

PHP Code:
<?php
if (is_category('babe')) {
?>
<a href="#"><img src="yourbabeadvert.jpg" alt="" /></a>
<?php
}

if (
is_category('lesbian')) {
?>
<a href="#lesbian"><img src="yourlesbianadvert.jpg" alt="" /></a>
<?php
}


if (
is_category('black')) {
?>
<a href="#black"><img src="yourblackadvert.jpg" alt="" /></a>
<?php
}

?>
As said, http://codex.wordpress.org/Conditional_Tags is where you want to look. Hit me up over icq if you need help. Note- that will display the ad when viewing just the category page itself. To display it when viewing a post in category x, use in_category()
thank you, All done out. Nice. ill try this
clickhappy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-19-2007, 10:36 AM   #15
clickhappy
Confirmed User
 
Industry Role:
Join Date: Mar 2004
Posts: 4,027
Quote:
Originally Posted by deadmoon View Post
ok, lets say you've got 3 categories,
babe
lesbian
black

this is untested, but should work ...

PHP Code:
<?php
if (is_category('babe')) {
?>
<a href="#"><img src="yourbabeadvert.jpg" alt="" /></a>
<?php
}

if (
is_category('lesbian')) {
?>
<a href="#lesbian"><img src="yourlesbianadvert.jpg" alt="" /></a>
<?php
}


if (
is_category('black')) {
?>
<a href="#black"><img src="yourblackadvert.jpg" alt="" /></a>
<?php
}

?>
As said, http://codex.wordpress.org/Conditional_Tags is where you want to look. Hit me up over icq if you need help. Note- that will display the ad when viewing just the category page itself. To display it when viewing a post in category x, use in_category()

It works!!
Thank you!

btw, I have a LOT of categories, would this slow down the page to have like 50 categories listed inthis code? is there a way to make it so I dont slow down the page processing?
clickhappy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.