How to show subcategories in categories else show posts

Your code checks for child categories and shows them if they exist, but you aren’t then going on to process the loop that would ordinarily display the posts in the current category. You want to extend your code to be of the form: if ( is_category() ) { $this_category = get_category($cat); if ( get_category_children( $this_category->cat_ID … Read more

Filter by post category in Media Library

You can use pre_get_posts to filter the query. So you can retrieve a category from query vars the retrieve the post with that category set the media query to include only post having that posts as parent To give an UI you can use restrict_manage_posts hook to output a category dropdown. add_action(‘pre_get_posts’, ‘my_filter_media_by_cat’); add_action( ‘restrict_manage_posts’, … Read more

Activate Gutenberg in category-descriptions

This isn’t possible at the moment, Gutenberg is a post editor that relies on REST API endpoints, it’s not an arbitrary content area editor as TinyMCE is. Given some modification though it could be made to work with a custom data model and be a replacement, but it’s not a trivial task, and what’s involved … Read more

Could not insert term into the database

OK. There where multiple issues here; wp_terms, wp_termmeta and wp_term_taxonomy all had their ID’s set not to AUTO_INCREMENT. Changing these and removing the 0 values from each table seems to have resolved this – very odd though. Big thanks to @N00b for helping!