GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Wordpress puzzle. (advanced code problem) (https://gfy.com/showthread.php?t=894653)

Jdoughs 03-19-2009 08:23 AM

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.

Jdoughs 03-19-2009 08:25 AM

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.

Jdoughs 03-19-2009 09:53 AM

bump and thanks in advance if someone is actually looking for the answer (i've tried a few things over the last few days)

beemk 03-19-2009 11:27 AM

jdoughs loves the cock!

Jdoughs 03-20-2009 03:10 AM

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.

Jdoughs 03-20-2009 02:35 PM

Badass.

Thanks Sands for the help and quick proper fix. You rock.

Sands 03-20-2009 02:39 PM

Quote:

Originally Posted by Jdoughs (Post 15654934)
Badass.

Thanks Sands for the help and quick proper fix. You rock.

No problem man, glad I could help. :thumbsup

fris 03-20-2009 05:09 PM

im too late!


All times are GMT -7. The time now is 05:07 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123