• When I use the plugin paired with WPML, it shows all the entries of the post type (in all languages).

    The function get_posts (line 279) in load_posts_hierarchical function, should have suppress_filters at false, since get_posts have it at true by default.

    I used this code in functions.php of my theme to do a temporary fix

    function add_filter_gravityforms_cpt ( $form ){
    	add_action('pre_get_posts','filter_gravityforms_cpt',10);
    	return $form;
    }
    add_filter( 'gform_pre_render' , 'add_filter_gravityforms_cpt' , 10 );
    
    function remove_filter_gravityforms_cpt ( $form_string ){
    	remove_action('pre_get_posts','filter_gravityforms_cpt' , 10);
    	return $form_string;
    }
    add_filter( 'gform_get_form_filter' , 'remove_filter_gravityforms_cpt' , 10 );
    
    function filter_gravityforms_cpt ( $obj ){
    	$obj->query_vars['suppress_filters'] = false;
    	return $obj;
    }

    i didn’t test it fully, but it works really well in my project.

    http://wordpress.org/extend/plugins/gravity-forms-custom-post-types/

  • The topic ‘[Plugin: Gravity Forms Custom Post Types] WPML not supported, temporary fix’ is closed to new replies.