Problem registering custom taxonomy

You haven’t passed the labels to register_taxonomy() correctly. That function works the same as register_post_type(), and you need to pass the labels the same way: as part of a ‘labels’ array in the arguments. Please refer to the documentation for the full list of accepted labels, but essentially, you need to organise the arguments this … Read more

Display taxonomies for custom post type

Here is a quick solution, that may guide you to desired result. $years = get_terms( array( ‘taxonomy’ => ‘product-year’, ‘hide_empty’ => true, ) ); $cats = get_terms( array( ‘taxonomy’ => ‘product-cat’, ‘hide_empty’ => true, ) ); if ( ! empty( $years ) && ! is_wp_error( $years ) ){ foreach ( $years as $year ) { … Read more

how to display custom taxonomy on an archive page?

I’m only going to focus on the category listing you have in the code above and ignore the custom query since that’s not what you’re asking about. <?php // I assume the custom taxonomy slug is “basics” $categories = get_the_terms( get_the_ID(), ‘basics’ ); // get_the_terms returns false, a wp error, or an array of term … Read more

List posts with slug title

If by “slug title” you mean a taxonomy (e.g. product category), then have a look at the code posted on the accepted answer on Display All Products by Category with WooCommerce It should give you an idea (or even the complete solution) how to get your posts listed.

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