Wordpress puzzle. (advanced code problem)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jdoughs
    Confirmed User
    • Mar 2004
    • 5794

    #1

    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
    Confirmed User
    • Mar 2004
    • 5794

    #2
    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!

    Comment

    • Jdoughs
      Confirmed User
      • Mar 2004
      • 5794

      #3
      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!

      Comment

      • beemk
        CLICK HERE
        • Jan 2002
        • 20829

        #4
        jdoughs loves the cock!
        I host with Vacares

        Comment

        • Jdoughs
          Confirmed User
          • Mar 2004
          • 5794

          #5
          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!

          Comment

          • Jdoughs
            Confirmed User
            • Mar 2004
            • 5794

            #6
            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!

            Comment

            • Sands
              Confirmed User
              • Feb 2007
              • 3134

              #7
              Originally posted by Jdoughs
              Badass.

              Thanks Sands for the help and quick proper fix. You rock.
              No problem man, glad I could help.

              Comment

              • fris
                Too lazy to set a custom title
                • Aug 2002
                • 55679

                #8
                im too late!
                Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                Comment

                Working...