• Resolved hgieg

    (@hgieg)


    Hello, I’m trying to filter a Woocomerce product by a Relationship field created in ACF, with CPT Brands.

    I’ve already managed to make the filter show the CPT name instead of the ID, following the code below:

    <?php
    add_filter('wpc_filter_post_meta_term_name', 'wpc_custom_term_name', 10, 2);
    function wpc_custom_term_name($term_name, $e_name)
    {   // related_post - is a filter meta key name. 
        if( $e_name === 'related_post' ){
            $term_name = get_the_title( $term_name );
        }
        return $term_name;
    }
    ?>

    I would like to know if it is possible to show the featured image of the CPT, in a similar way to how it works in taxonomies.

    If it is not possible now, are you planning to add this functionality?

    Thanks.

Viewing 1 replies (of 1 total)
  • Plugin Support fesupportteam

    (@fesupportteam)

    Hi @hgieg

    No, unfortunately, you cannot hang it on custom fields because taxonomy terms have their custom fields, and each term has an opportunity to set a picture in that field. The custom field’s value does not have its own custom field, and therefore, it cannot be done in that way.

    We’re uncertain because it’s necessary to go through all the custom fields values and set on the specific values the pictures from some source. This could result in numerous dependencies, slowing down the process.

    Best Regards – Victor

Viewing 1 replies (of 1 total)
  • The topic ‘CPT Featured Image?’ is closed to new replies.