Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Sub Categories List at top of Categories Page

  1. #1
    Thread Starter
    Senior Member webcrafty's Avatar
    Join Date
    Aug 2011
    Location
    Ireland
    Posts
    114
    Thanks
    4
    Thanked 2 Times in 2 Posts

    Question Sub Categories List at top of Categories Page

    Hi
    I am trying to output a list of Sub Cats at the top of the Categories page, I have used the code from the sidebar sub cats widget and got it working, see image below.

    categories-page-with-top-cats.jpg

    Now I want to list the sub cats in a 3 column list. Does anyone know what code I need for this ?
    This is the code I am using now,
    Code:
      <?php if ( is_tax( APP_TAX_CAT ) ) {
    
            // go get the taxonomy category id so we can filter with it
    
            // have to use slug instead of name otherwise it'll break with multi-word cats
    
            if ( !isset( $filter ) )
    
                $filter = '';
    
            $ad_cat_array = get_term_by( 'slug', get_query_var(APP_TAX_CAT), APP_TAX_CAT, ARRAY_A, $filter );     
    
            // show all subcategories if any 
    
            $subcats = wp_list_categories( 'hide_empty=0&orderby=name&show_count=1&title_li=&use_desc_for_title=1&echo=0&show_option_none=0&taxonomy='.APP_TAX_CAT.'&depth=1&child_of=' . $ad_cat_array['term_id'] ); 
    
            if ( !empty( $subcats ) ) : 
    
            ?>
    
                <div class="shadowblock_out">
    
                    <div class="shadowblock">
    
                        <h2 class="dotted"><?php _e('Sub Categories', 'appthemes') ?></h2>
    
                        <ul>
    
                            <?php print_r( $subcats ); ?>
    
                        </ul>
    
                        <div class="clr"></div>   
    
                    </div><!-- /shadowblock -->
    
                </div><!-- /shadowblock_out -->  
    
            <?php endif; ?>
    Would I need a new css rule or can it be done with php ?

    Thanks
    Ireland's New Classified Ad's website, The New way to buy and sell in Ireland ,
    http://www.sellitnow.ie

  2. #2
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    40,958
    Thanks
    169
    Thanked 3,405 Times in 3,276 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  3. #3
    Thread Starter
    Senior Member webcrafty's Avatar
    Join Date
    Aug 2011
    Location
    Ireland
    Posts
    114
    Thanks
    4
    Thanked 2 Times in 2 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Ireland's New Classified Ad's website, The New way to buy and sell in Ireland ,
    http://www.sellitnow.ie

  4. #4
    Rookie ketiga's Avatar
    Join Date
    Jan 2012
    Location
    Netherlands
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  5. #5
    Junior Member cyjambo's Avatar
    Join Date
    Apr 2012
    Location
    Austria
    Posts
    45
    Thanks
    11
    Thanked 4 Times in 2 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  6. #6
    Senior Member altafshah's Avatar
    Join Date
    Mar 2011
    Location
    United Arab Emirates
    Posts
    120
    Thanks
    6
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!
    --------------------------------------
    UAE Autos Classified Powered by ClassiPress
    India's mobile phones Classified Powered by ClassiPress 3.1
    PAK Free Classifieds (Next Project) Powered by ClassiPress

  7. #7
    Junior Member cyjambo's Avatar
    Join Date
    Apr 2012
    Location
    Austria
    Posts
    45
    Thanks
    11
    Thanked 4 Times in 2 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  8. #8
    Senior Member altafshah's Avatar
    Join Date
    Mar 2011
    Location
    United Arab Emirates
    Posts
    120
    Thanks
    6
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!
    --------------------------------------
    UAE Autos Classified Powered by ClassiPress
    India's mobile phones Classified Powered by ClassiPress 3.1
    PAK Free Classifieds (Next Project) Powered by ClassiPress

  9. #9
    Junior Member cyjambo's Avatar
    Join Date
    Apr 2012
    Location
    Austria
    Posts
    45
    Thanks
    11
    Thanked 4 Times in 2 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  10. #10
    Senior Member altafshah's Avatar
    Join Date
    Mar 2011
    Location
    United Arab Emirates
    Posts
    120
    Thanks
    6
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!
    --------------------------------------
    UAE Autos Classified Powered by ClassiPress
    India's mobile phones Classified Powered by ClassiPress 3.1
    PAK Free Classifieds (Next Project) Powered by ClassiPress

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [TUTORIAL] Only show the categories list on the first page
    By foundationmedia in forum ClassiPress General Discussion
    Replies: 1
    Last Post: August 15th, 2011, 09:31 AM
  2. List Categories
    By dsrebelo in forum Report ClassiPress Bugs
    Replies: 1
    Last Post: December 22nd, 2010, 09:56 AM
  3. Categories to which I do not want people to list under...
    By rpmbg in forum Help Using ClassiPress
    Replies: 1
    Last Post: October 15th, 2010, 09:06 AM
  4. Replies: 1
    Last Post: September 9th, 2010, 04:55 PM