How to remove specific categories from tag archives?

One way to do this would be to create a custom widget which displays categories using wp_list_categories(). Then exclude any categories you don’t want displayed using the exclude option of wp_list_categories(): http://codex.wordpress.org/Template_Tags/wp_list_categories#Include_or_Exclude_Categories. This example below creates a custom categories widget in Appearance / Widgets. This code can be added to functions.php or used in a … Read more

get parent_category class in loop

First you would need to check if the category has children, if it does then we can show a few things. Below is a helpful function to check just that. function category_has_children( $term_id = 0, $post_type=”post”, $taxonomy = ‘category’ ) { $children = get_categories( array( ‘child_of’ => $term_id, ‘type’ => $post_type, ‘taxonomy’ => $taxonomy ) … Read more

Add category links?

i tried placing the above code under my _index.php file.. which is showing fine with a little css i can make it how i want it to be like. but i cant seem to have the categories show up on the other subcategory pages like music, products or thoughts. If you managed to get it … Read more

Show parent category if there is no subcategory

Your question is not that clear, I suggest you to improve your question. You can try adding array parameter hide_empty to false in this case “0” so that it shows all the category even the one with no post. $thisCat = get_categories(array(‘child_of’=>$_GET[‘cat’], ‘hide_empty’=>0)); You can also refer the WordPress get_categories Codex Hope this helps!

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