List Categories By Specified First Character

global $wpdb; // In case it’s in a function… $parent = 0; // Change to dig deeper in tree $wpdb->query( <<<SQL SELECT t1.`term_id`, /* The ID */ t1.`name`, /* The name */ t1.`slug`, /* The slug */ t2.`parent`, /* The parent ID */ t2.`count` /* The item Count */ FROM {$wpdb->terms} AS t1, {$wpdb->term_taxonomy} AS … Read more

show only sub categories if available?

use a conditional statement, for example: $sub_cats = get_categories(‘parent=”.get_query_var(“cat’)); if( $sub_cats ) : //show list of child categories, for instance with wp_list_categories() echo ‘<ul>; wp_list_categories(‘title_li=&child_of=”.get_query_var(“cat’)); echo ‘</ul>’; //or possibly using $sub_cats and a foreach loop// echo ‘<ul>’; foreach( $sub_cats as $sub_cat ) { echo ‘<li><a href=”‘.get_category_link($sub_cat->term_id).'”>’.$sub_cat->name.'</a></li>’; } echo ‘</ul>’; else: //the ‘normal’ LOOP of category.php// … Read more

Check boxes for showing categories

Although it looks like by default it has the categories as a dropdown select, it looks like this plugin could be slightly modified to fit your needs: Taxonomy Picker Taxonomy Picker is a widget which you can include in your sidebar to help visitors build complex queries using categories and your custom taxonomies by chosing … Read more

Category pagination not working

You should take a closer look at the [http://codex.wordpress.org/Template_Hierarchy Template Hierarchy]. From what I understood in your code is that you’re trying to list posts in the category where ID = 5. You can easily map that to the category-slug.php or category-id.php template files, so you won’t have to do any extra get_posts. The problem … Read more