For example, if I have a custom taxonomy called "custom-category" and the term "WordPress", is there any way to get the taxonomy "custom-category" by term slug "wordpress".
This cant be used: get_term_by('slug', 'wordpress')
since I have slug not term id.
USE CASE:
$tag = get_term_by('slug', 'wordpress');
$the_query = new WP_Query( array(
'post_type' => 'custom-post',
'tax_query' => array(
array (
'taxonomy' => $tag->taxonomy,
'field' => 'slug',
'terms' => array( 'wordpress' )
)
),
) );