Tag Info

New answers tagged

0

Your widget must have a method that looks something like this: public function widget( $args, $instance ) { echo $args['before_widget']; if ( ! empty( $instance['title'] ) ) { echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ). $args['after_title']; } wp_list_categories(); echo $args['after_widget']; ...


0

solved this with if ($cat_array) { foreach($cat_array as $cat) { $category = get_term_by('ID',$cat, 'category'); if($category->name != 'Excluded category'){ echo '<div class="catspace"><a href="' . esc_attr(get_term_link($category, 'category')) . '" title="' . sprintf( __( "latest posts %s" ), $category->name ) . ...


1

You can use CSS pseudo selectors to include the icons. :before if you need in front of the categories or :after for placing it to the right. li.cat-item::before { content: url("Icon image URL here"); }


1

Just skip the excluded category in your foreach: foreach ( $cat_array as $cat ) { if ( $cat != EXCLUDED_CAT_ID ) { // Output } }



Top 50 recent answers are included