Problem displaying one post from each category

I’ve checked this code localy, here is the working snippet: <?php $cat_args = array( ‘orderby’ => ‘name’, ‘order’ => ‘ASC’, ); $fcategories = get_categories($cat_args); foreach($fcategories as $fcategory) { echo ‘<dl>’; echo ‘<dt> <a href=”‘ . get_category_link( $fcategory->term_id ) . ‘” title=”‘ . sprintf( __( “View all posts in %s” ), $fcategory->name ) . ‘” ‘ … Read more

Are Category or Tag Archive Pages Possible?

This is absolutely possible. By default, the category archive page will be at domain.com/category/the_category. The file that is typically used for this rendering is category.php, which is located in your theme directory. To remove the /category/ part, so that your category archives are at domain.com/the_category, you can use the SEO Ultimate plugin. After installing the … Read more

Display WordPress Parent Categories Only?

This should do what you’re looking for. It’s untested, I just whipped it up really quick right now, but the concept is there. function my_get_highest_parent( $id ) { $cat = get_category( $id ); $parent = $cat->parent; if( $parent == 0 ) return $id; else my_get_highest_parent( $parent ); }

wp_parse_args & category parameter

Update 3/5: When I originally answered this question I didn’t realize that your code was almost an exact copy of the wp_get_archives function. There is nothing in your code or the original wp_get_archives code that supports categories. The function was written to get date archives and your defaults are missing the type, limit, before and … Read more

Multiple Category Search

I found the solution… My functions page now looks like: <?php class dropdown extends Walker_CategoryDropdown { function start_el(&$output, $category, $depth, $args) { $pad = str_repeat(‘&nbsp;’, $depth * 3); $cat_name = apply_filters( ‘list_cats’, $category->name, $category ); $output .= “\t<option class=\”level-$depth\” value=\””.$category->slug.”\””; $output .= ‘>’; $output .= $pad.$cat_name; if ( $args[‘show_count’] ) $output .= ‘&nbsp;&nbsp;(‘. $category->count .’)’; … Read more