How to pass contextual filter to a view pane?
Add another condition to check the specific display name 

if($view-&gt;current_display == 'display_name')


Here display_name of particular display can be found in Advanced Option -> Machine Name