category_count gives wrong number of posts in category

I don’t know if your issue is cached values at all, but get_category() does cache results, so it’s a possibility. Here are some other options: $current_cat_id = get_query_var(‘cat’); $category = get_category($current_cat_id); // One possibility: $count_a = get_category_count( $category->slug ); // OR… another possibility: $count_b = wp_count_terms( $category->slug );

inner-wrap div pushing custom table far down on page

Part of the problem is that you’re running (or re-running) get_header() after your table, thus putting all of the header content into the body of page after the table HTML has started. <?php /* Template Name: Custom Table Is this part even needed for you? If this is a complete template, then probably, but if … Read more