Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 1 of 1
  1. #1
    Senior Member dotcommakers's Avatar
    Join Date
    Oct 2003
    Posts
    527
    Member #
    3342
    Liked
    1 times
    I need a little complex loop finished

    Here is the site I am working on.
    http://prothane.com/complete_kits.php.
    It has lots charts. To make things easier for admin, I need to find a solution so admin just enter data like post and charts become ready so thought to use custom post type, taxonomy.

    I made this page as custom post type "Total Kits" - "total-kits"

    The titles in red are Taxonomy and data under red titles are posts with custom fields - no title - no post content.. just custom fields will be listed

    So far I am able to get all things but just not getting posts listed under a taxonomy.. thing is that I need to list Taxonomy and posts under that like "Import & Domestic Cars" is taxonomy and post under that should be like this

    Import & Domestic Cars
    >> post 1
    >> post 2

    taxonomies can be any number of ..

    Following is the code.. I am able to list taxonomies for this custom post type

    PHP Code:
    <?php $args = array( 'post_type' => 'total-kits''posts_per_page' => 10 );
    $loop = new WP_Query$args );

    while ( 
    $loop->have_posts() ) : $loop->the_post();
    $cat get_the_term_list$post->ID'totalkits_cat'''' ''' );
    echo 
    $cat .'<br />';

    endwhile; 
    ?>

  2.  


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 06:03 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com