Title: Convert ACF Strings to Names?
Last modified: November 3, 2023

---

# Convert ACF Strings to Names?

 *  [hgieg](https://wordpress.org/support/users/hgieg/)
 * (@hgieg)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/convert-acf-strings-to-names/)
 * 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:
 *     ```wp-block-code
       <?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.

 * ![](https://ps.w.org/woocommerce-ajax-filters/assets/icon-256x256.gif?rev=2770304)
 * [Advanced AJAX Product Filters](https://wordpress.org/plugins/woocommerce-ajax-filters/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-ajax-filters/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-ajax-filters/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-ajax-filters/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-ajax-filters/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-ajax-filters/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [hgieg](https://wordpress.org/support/users/hgieg/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/convert-acf-strings-to-names/)
 * Status: not resolved