Exposed Filter not shown in view which has a Custom Filter Handler I have a view and I programmatically created a filter for this view. (I pasted the code below).

This filter works fine but I had other Exposed Filter created inside the view (created by clicking add filter in the view). 

Now the filter added programmatically is working fine but the other one is not shown at all.

If I disable the filter added programmatically then the other one is shown correctly. So the problem is in the code I guess.

I need both filter working together. 

here is the code which adds the filter:

/**
 * Implements hook_views_pre_view().
 */
function vouchers_views_pre_view(&amp;$view, &amp;$display_id, &amp;$args) {

   if ($view-&gt;name == 'vouchers') {
    $info = array(
      'table' =&gt; 'field_data_field_labpoints',
      'field' =&gt; 'field_labpoints_value', // name of value field in that table.
      'value' =&gt; array('value' =&gt; userpoints_get_current_points()), // dynamic part.
      'operator' =&gt; '&lt;',
      'id' =&gt; 'field_data_field_labpoints_vouchers', // unique id.
      'group' =&gt; 100, // new group.
    );
    $handler = views_get_handler($info['table'], $info['field'], 'filter');

    $handler-&gt;init($view, $info);
    $view-&gt;display_handler-&gt;handlers['filter'][$info['id']] = &amp;$handler;

    unset($handler);
  }
}
I would do this by adding a contextual filter, previously called an argument in D6 Views. You can set contextual filters / arguments in code when you embed a view. So, you could add a contextual filter for field_labpoints (not sure what kind of field this is) and pass along the argument you want to filter for when you embed the View in a .tpl file or a panel or whatever:

print views_embed_view('my_view_name', 'block_1', $labpoints_value);


This allows you to make the View more dynamic without tinkering with the existing filters.