filter for thumbnail not working for custom taxonomy term

I figured it out, in case anyone else needs it, it was really simple, and just used an elseif for when the id was not found & changed the custom field name to the custom taxonomy image field ( workplace_thumb ) for that taxonomy id. if ( ! function_exists(‘custom_subcategory_thumbnail’) ): remove_action(‘woocommerce_before_subcategory_title’, ‘woocommerce_subcategory_thumbnail’); add_action(‘woocommerce_before_subcategory_title’, ‘custom_subcategory_thumbnail’, 10, … Read more

Custom endpoint filtering post by custom taxonomies

Solved!!! A friend of my found the way function get_latest_posts_by_term($request) { $parsed_args=[ ‘numberposts’ => 20, ‘orderby’ => ‘date’, ‘order’ => ‘DESC’, ‘post_type’ => ‘post’, ‘tax_query’ => array( array ( ‘taxonomy’ => $request[‘slug’], ‘field’ => ‘slug’, ‘terms’ => $request->get_param(‘name’), ) ), ]; $get_posts = new WP_Query; $posts= $get_posts->query( $parsed_args ); //$posts = get_posts($args); if (empty($posts)) { … Read more