Migrating Hierarchal Taxonomy Categories Between Post Types

So that at least there’s a solution here, will add that this plugin seems to succesfully migrate Posts as well as category and hierarchy.: https://wordpress.org/plugins/post-type-convertr. On the production server, I also needed to run the following SQL query after migrating with the Post Type Convertr plugin: UPDATE wp_term_taxonomy SET taxonomy=’project-category’ WHERE taxonomy=’product_cat’; I dunno. Sorry … Read more

How to query for posts (hierarchical custom post type) that have children but are NOT top level?

You can use filters to modify the SQL. I added something unique in the post_type so I could filter only this query and not change anything else. The query for example $query = new WP_Query(array(‘post_type’=>’something_unique_for_filter’)); And the filter function custom_where($where, $query) { global $wpdb; if(false !== strpos($where, ‘something_unique_for_filter’)) { $where = ” AND post_type=”page” AND … Read more

Can I assign a Folder for Post Formats, without it affecting WordPress’ fallback/hierarchical system?

In general, “bad practice” is so common in the wordpress ecosystem, you will have to do something really bad for anyone to actually signal you out for doing it 😉 If you are the developer and maintainer of the theme, you should develop it in a way which will be easy for you to maintain … Read more

Creating a non-hierarchical Taxonomy that behaves like categories

This blog post by “Gazchap” deals with exactly the situation you are, and they updated it after publishing to your follow-up problem: Fortunately, version 4.4 of WordPress introduced a filter – post_edit_category_parent_dropdown_args – that could be used to control the parent terms shown in these meta boxes. It’s designed to let the developer change the … Read more

Display a specific hierarchical level of a specific custom taxonomy

Change: get_the_category() to get_the_terms( null, ‘taxonomy_name’ ). get_category_link( $cat->cat_ID ) to get_term_link( $cat->term_id ). get_category( $category->category_parent ) to get_term( $category->parent ). If you want to use the same function for multiple taxonomies, you can accept the taxonomy name as an argument and pass it to the first item above: function display_cat_level( $level = 0 , … Read more

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