Category page showing posts from all categories

That happens because you are overwriting the query with you $args, If you want to modify it and not overwrite it then use this format: //get the $query_string in to your $args array global $query_string; parse_str( $query_string, $args ); //modify whatever you want $args[‘post_type’] = ‘post’; $args[‘posts_per_page’] = 5; $args[‘orderby’] = ‘comment_count’; query_posts($args);

Display list of Sub-Categories and the posts they contain, within one main Category

Question was answered on another site.. thank you! BTW, the code that accomplished what I needed was: $categories = get_categories(‘child_of=31’); foreach ($categories as $category) { //Display the sub category information using $category values like $category->cat_name echo ‘<h2>’.$category->name.'</h2>’; echo ‘<ul>’; foreach (get_posts(‘cat=”.$category->term_id) as $post) { setup_postdata( $post ); echo “<li><a href=”‘.get_permalink($post->ID).'”>’.get_the_title().'</a></li>’; } echo ‘</ul>’; }

Are Categories, Tags and Custom Taxonomies any different in regards to SEO?

Short answer: No. When you’re working with SEO, there are three things to take into account: Site content Site meta descriptions Site findability (it’s a word, I swear!) Site Content Search engines will parse your site’s content looking for content and keywords. Create good, useful content and it will be fetched, parsed, and recorded appropriately. … Read more

How to Make a Categories Meta Box with Hierarchical Checkboxes on Frontend?

Try wp_terms_checklist() / wp_category_checklist. It will output a list of checkboxes named post_category. You might need to include the source file too, because it’s defined within administration files. Or use a custom walker: class MyCategoryWalker extends Walker_Category{ public function start_el(&$output, $term, $depth, $args){ $args = wp_parse_args(array( ‘name’ => ‘my_category_input’, ‘checked’ => array(), ), $args); extract($args); … Read more

Categories’ hierarchy in URL

The permastruct /%category%/%postname%/ will include the categories and subcategories in the URL from top to first assigned child. So, if you want the URL be site.com/source/books/moby-dick/*postname*, you have to assign the post only to “Moby Dick”. Assigning the post only to “Moby Dick” category will still show the post under “source” and “books” category archives … Read more