Pods Relationship Fields

Forums › Forums › Search & Filter Pro › Pods Relationship Fields

Viewing 6 posts – 1 through 6 (of 6 total)
  • Trevor
    #243620

    The earlier answer still stands, but V3 is coming in June (we hope, but that may flex a bit). What you need will require an extension plugin (most likely), so that may be further off, maybe not until V3.1.

    Ross Moderator
    #243695

    Hi Jo

    This is actually possible using one of our filters – are you comfortable tweaking a little PHP to put in your themes functions.php file?

    Thanks

    Anonymous
    #260658

    Hello Team,

    I am looking for the same, please let me know if any way to do it by tweaking functions.php file.

    Thanks

    Ross Moderator
    #260793

    Hi Sunny

    You can replace the ID’s, by post title, by adding this to functions.php:

    
    function filter_input_object($input_object, $sfid) {
    	
    	if(($input_object['name'] == '_sfm_podsrelationship')) {
    		
    		foreach($input_object['options'] as $option) {
    			$option->label = get_the_title($option->value);
    		}
    		
    		return $input_object;
    	}
    	else {
    		
    		return $input_object;
    	}
    }
    add_filter('sf_input_object_pre', 'filter_input_object', 10, 2);

    Make sure to change the name of the field to match yours:
    _sfm_podsrelationship

    To find your field name, just check the URL when you do a search:
    https://searchandfilter.com/documentation/accessing-search-data/?sfref=dc#how-to-get-the-field-name

    Let me know how you get on.

    Thanks

    Anonymous
    #262907

    Thanks mate, this is the solution I was looking for

Viewing 6 posts – 1 through 6 (of 6 total)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.