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 02-04-2012, 11:25 PM   #1
MyDogHasFleas
Confirmed User
 
Join Date: Apr 2008
Posts: 529
Wordpress category question

Is there a way to make a post show up only in the category page and not on the main page? For example I want to add some gay posts to my blog... but I only want them accessible from the gay category. Is this possible?
MyDogHasFleas is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-04-2012, 11:33 PM   #2
harvey
Confirmed User
 
harvey's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: 127.0.0.1
Posts: 9,266
of course, just open your index page, look for the query and add

Code:
'&cat=-15'
where 15 is your "gay" category.

If you want to exclude it ONLY in main page but not in archives, do as follows:

Code:
<?php if ( is_home() ) 
{
query_posts($query_string . '&cat=-15, -20');
}
?>
where, again, 15 is your gay category and 20 is your tranny category, assuming you need to exclude more than 1 cat. Replace with your real category IDs, obviously
__________________
This post is endorsed by CIA, KGB, MI6, the Mafia, Illuminati, Kim Jong Il, Worldwide Ninjas Association, Klingon Empire and lolcats. Don't mess around with it, just accept it and embrace the truth
harvey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-05-2012, 03:18 PM   #3
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
or for the less wp friendly crowd theirs a nice plugin, i think advanced category exclude, which will work without touching any code.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris 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.