PHP Code to Display Term URL & Name of a Post Under a Custom Post Type

Use get_object_taxonomies to get all of the taxonomies registered to a particular post type. Also, don’t use query_posts for secondary queries. or ever, actually. Use WP_Query. $args = array( ‘posts_per_page’ => 1, ‘post_type’ => ‘movies’, ‘orderby’ => ‘post_date’, ‘meta_key’ => ‘featured_movie’, ‘meta_compare’ => ‘=’, ‘meta_value’ => 1, ); $movie = new WP_Query( $args ); if( … Read more

Programmatically add posts add and assign postmeta and assign terms

The woocommerce product category is just a custom taxonomy. As far as I know all the data is stored as intended by wordpress core. You can find out more about the database structure at the codex page Database Description, the tables you are looking for are wp_terms, wp_term_relationships and wp_term_taxonomy. But you absolutely should look … Read more