Call Current Category

The problem is that your call to query_posts is overwriting the original query for the page. You have to get the original query, then modify any params from there. global $query_string; // start with the original query $myquery = wp_parse_args($query_string); // make any changes to the query here $myquery[‘posts_per_page’] = 9; query_posts($myquery);

Having Trouble With get_category_by_slug In a Custom Function

function ribbon_list_cats( $parent_cat_slug, $echo = true ) { $parent_category = get_category_by_slug( $parent_cat_slug ); if ( $parent_category->count > 0 ) { $output=”<ul>”; $output .= wp_list_categories(‘title_li=&child_of=”.$parent_category->term_id.”&hide_empty=0&show_option_none=&echo=0’); $output .= ‘</ul>’; } // Debug: uncomment the following line // echo ‘<pre>’; var_dump( $output ); echo ‘</pre>’; if ( $echo === false ) return $output; return print $output; } // … Read more

Change Category Page Display

Category pages or archives? If you’re a little more specific you will probably get multiple ideas, but in general, if you’ve got a loop you can use one of the two following functions: <?php the_excerpt(); ?> will show the custom or default excerpt for the post <?php the_content(‘Read More &raquo;’); ?> will show the full … Read more

Show category-ID in custom category-list

Try this: <div id=”category-list”> <ul class=”topnav”> <?php if (is_single()){ global $post; $pid = $post->ID; $post_categories = wp_get_post_categories( $post->ID ); $cats = array(); foreach($post_categories as $c){ $cat = get_category( $c ); $cats[] = $cat->ID; } $active_cat_count = true; $cat_count = 0; } $kategorien = get_categories(array( ‘child_of’ => 0, ‘exclude_tree’ => 15, ‘exclude’ => 16, ‘orderby’ => … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)