• Hello,

    When filtering by acf relationship field, it works great, but the names appear with strings: a:1:{i:0;s:5:”93825″;}

    Is there any PHP snippet capable of transforming these strings into names?

    As an example, I went through a similar situation with Filter Everything and they told me this:

    <?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;
    }
    ?>

    But I consider the Berocket to be better in all aspects, and I’m even waiting for a Black Friday offer to buy it.

    Thanks

The topic ‘Convert ACF Strings to Names?’ is closed to new replies.