Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Danny van Kooten

    (@dvankooten)

    Hi Jan,

    Something like this should work. 🙂

    function my_prefix_show_box_in_ie($show, $box_id) {
    
     	// change 123 to the ID of the box you want to show for Google visitors only
    	if( $box_id !== 123 || $show === false ) {
    		return $show;
    	}
    
    	$referer = isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : '';
    
    	$show = ( stristr( $referer, 'google' ) !== false );
    
    	return $show;
    }
    
    add_action('stb_show_box', 'my_prefix_show_box_in_ie', 10, 2);

    Hope that helps!

    Thread Starter esucces

    (@esucces)

    Cool, thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Open only for certain users – like Google visitors’ is closed to new replies.