Category Alphabet List Broken

ANSWER REVISITED I have just done the same type of answer on SO and took another route that is way faster than my original answer. I thought it would be nice to revisit this answer and post my new approach for benefit of this site. The name__like parameter of get_terms was changed in WordPress 3.7. … Read more

Removing the number in a category slug

You probably have a tag with the same slug. You can’t have any taxonomies with duplicate slugs. Either delete that other taxonomy, rename/change its slug, or change/rename this category. EDIT Ok, it turns out you can do this, if you don’t mind programming the fix or directly executing the SQL or messing with PHPMyAdmin. What … Read more

Showing all the posts in one page?

This is what I would consider the correct solution, and is the solution alluded to by Milo’s comment (if I am not mistaken). function alter_ppp_for_tags_wpse_88337($qry) { if ( is_tag() && $qry->is_main_query() ) { $qry->set(‘posts_per_page’,’-1′); } } add_action(‘pre_get_posts’,’alter_ppp_for_tags_wpse_88337′); Using query_posts will cause two requests to the database– the main query, and the query triggered by the … Read more

Auto add pages to category menu

Yes, it’s possible. Depending on the way you build your menu, you’d have to call the posts like this (fill in placeholders): // Call/Query the posts related to the category: $your_cat_related_cpts = get_posts( array( ‘post_type’ => ‘YOUR_CUSTOM_POST_TYPE’ ,’category’ => ‘YOUR_CATEGORY’ ) ); // Append them to your menu: foreach ( $your_cat_related_cpts as $content ) { … Read more

Save metabox checkboxes values to custom content type

I have rethought the problem: Finally, I resolve it with save_post hook: function enhanced_portfolio_categories_save_post(){ $terminos = array(); foreach ($_POST[‘my_categories’] as $key) { $custom_tax = get_term_by(‘term_id’, $key, ‘portfolio_categories’); array_push($terminos, $custom_tax->term_id); } wp_set_object_terms( $_POST[‘post_ID’], $terminos, ‘portfolio_categories’); }