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 03-19-2009, 08:23 AM   #1
Jdoughs
Confirmed User
 
Jdoughs's Avatar
 
Industry Role:
Join Date: Mar 2004
Location: Great White North
Posts: 5,794
Wordpress puzzle. (advanced code problem)

Allright, I've been tweakin and playing with a theme and have done some extensive 'categorizing' to lay out this site. But just cant get the main page to display its categories and childs properly (non conventionally btw)

It has Parent Categories for A through Z. http://www.classic-porn.ca/list/j/ <-- category
Stars are childs of the first letter of their name, IE, Joanna Storm is a child category of "J ". http://www.classic-porn.ca/list/j/joanna-storm/ <-- child category of J

Now here is the issue, this code here displays the categories (as picked in the config to display on main index), if you look at www.classic-porn.ca , you can see that the Categories (A -Z) are listed, and the movies are posted, BUT it is showing the wrong child category. IE Bunny Bleu shows up in her parent Category (properly) but she also shows up in 'G' and in 'R' (because that movie is also posted in those other categories (its pulling them alphabetically I suppose but I need it to pull the proper child category that fits under that Parent.

PHP Code:
    <?php $i 0?>
    <?php foreach ($left_categories as $section) { ?>
    <?php $i++; ?>
    <?php query_posts('showposts=1&cat='.$section); ?>
    <?php $feed $section?>
    <h2><?php single_cat_title(); ?> <a href="<?php print get_category_feed_link($feed''); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/rss.png" alt="" title="RSS" /></a></h2>
    <a href="<?php echo get_category_link($section); ?>" class="more">Read More</a><div class="clear"></div>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <div class="postbox">
    <div class="top_thumb"><?php show_thumb(60,90); ?></div>
    <div class="top_entry">
<h3><?php
$category 
get_the_category();
echo 
$category[0]->cat_name;
?> - <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3><br />
        <div class="excerpt"><p><?php print do_excerpt(get_the_excerpt(), 15); ?></p></div>
        <ul class="postbit">
        <li><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">Read Full Story</a></li>
        <li><a href="<?php the_permalink() ?>#comments" title="Go to Comments"><?php comments_number('0 Comments','1 Comment','% Comments'); ?></a></li>
        </ul>
    </div><div class="clear"></div>
    </div>
Now its all 'functioning' properly, I just need it to 'display' the proper child category, so that the stars name (child category) is shown that the post is associated with. So that Bunny Blue doesnt show up in 3-4 categories on the main page, only the category that she is a 'child' of.

Thanks a bunch, im fucking baffled at this point.
__________________
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!
Jdoughs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-19-2009, 08:25 AM   #2
Jdoughs
Confirmed User
 
Jdoughs's Avatar
 
Industry Role:
Join Date: Mar 2004
Location: Great White North
Posts: 5,794
Code:
<?php
$category = get_the_category();
echo $category[0]->cat_name;
?>
thats the little strip of code that pulls the child out, but it only lists one, and always alphabetical, where what I need it to do is to pull the child that matches the letter (category)

get_parent and all that type shit I cant seem to make it spin.
__________________
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!
Jdoughs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-19-2009, 09:53 AM   #3
Jdoughs
Confirmed User
 
Jdoughs's Avatar
 
Industry Role:
Join Date: Mar 2004
Location: Great White North
Posts: 5,794
bump and thanks in advance if someone is actually looking for the answer (i've tried a few things over the last few days)
__________________
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!
Jdoughs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-19-2009, 11:27 AM   #4
beemk
CLICK HERE
 
Industry Role:
Join Date: Jan 2002
Posts: 20,829
jdoughs loves the cock!
__________________
I host with Vacares
beemk is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-20-2009, 03:10 AM   #5
Jdoughs
Confirmed User
 
Jdoughs's Avatar
 
Industry Role:
Join Date: Mar 2004
Location: Great White North
Posts: 5,794
Bump again, if someone knows someone 'talented' in wordpress toss them this thread, if no-one can offer the fix for free, i'll gladly toss some paypal at someone to fix it.

Line or two of code, just cant pull the child from its parent.
__________________
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!
Jdoughs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-20-2009, 02:35 PM   #6
Jdoughs
Confirmed User
 
Jdoughs's Avatar
 
Industry Role:
Join Date: Mar 2004
Location: Great White North
Posts: 5,794
Badass.

Thanks Sands for the help and quick proper fix. You rock.
__________________
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!
Jdoughs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-20-2009, 02:39 PM   #7
Sands
Confirmed User
 
Sands's Avatar
 
Join Date: Feb 2007
Location: 418194907
Posts: 3,134
Quote:
Originally Posted by Jdoughs View Post
Badass.

Thanks Sands for the help and quick proper fix. You rock.
No problem man, glad I could help.
Sands is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-20-2009, 05:09 PM   #8
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,372
im too late!
__________________
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.