Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Saravana Kumar K

    (@mycholan)

    Yes you can, some thing like this.

    add_filter( 'wccpf/before/fields/rendering', 'render_fields_by_tag' );
    function render_fields_by_tag( $field ) {
    	global $post;
    	$html = "";
    
    	if( has_tag( "Your Tag", $post ) ) {
    		$html = '<input type="text" name="'. esc_attr( $field["name"] ) .'" value="'. esc_attr( $field["default_value"] ) .'" placeholder="'. esc_attr( $field["placeholder"] ) .'" maxlength="'. esc_attr( $field["maxlength"] ) .'" />';'
    	}
    	return $html;
    }
    Thread Starter alex.gav

    (@alexgav)

    Thanks,
    It would be good to have this option (rule) available in the plugin settings.

    Plugin Author Saravana Kumar K

    (@mycholan)

    Bit late but Rules By Tag option has been included with V1.2.5

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Rule by Tags’ is closed to new replies.