Sub-pages of Custom Taxonomies

I’d do it something like this. First, register a new query var, so WP will acknowledge its existence: add_filter( ‘query_vars’, function( $query_vars ) { $query_vars[] = ‘cast’; return $query_vars; }); Next, add a rewrite rule, which converts the pretty permalink version of your URL behind the scenes: add_action( ‘init’, function() { add_rewrite_rule( ‘^movie/([^/]+)/cast/?$’, ‘index.php?movie=$matches[1]&cast=1’, ‘top’ … Read more

Display posts from specific slug of the custom taxonomy in WordPress

I would recommend becoming intimately familiar with the WP_Query parameters: https://developer.wordpress.org/reference/classes/wp_query/ In your particular case; dealing with taxonomies: https://developer.wordpress.org/reference/classes/wp_query/#taxonomy-parameters Here is the proper code to pull from a taxonomy: $args = array( ‘post_type’ => ‘post’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘units’, ‘field’ => ‘slug’, ‘terms’ => $term->slug ), ), ); $query = new WP_Query( … Read more

How to looping taxonomy terms?

Rather than relying on a literal menu, you could use wp_list_pages possibly to better effect and sort out by certain criteria if you wish, then foreach page, display terms. Here is a little function I wrote to spit out terms for a taxonomy passed to it: // give taxonomy, will return link list to custom … Read more

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