Hi Jan,
Yes, you should be able to do such a thing by adding the following code snippet to your theme its functions.php file.
function my_prefix_show_box_in_ie($show, $box_id) {
// change 123 to the ID of the box you want to show on IE only
if( $box_id !== 123 ) {
return $show;
}
$show = preg_match('~MSIE|Internet Explorer~i', $_SERVER['HTTP_USER_AGENT']);
return $show;
}
add_action('stb_show_box', 'my_prefix_show_box_in_ie', 10, 2);
Hope that sets you off in the right direction, good luck!
Hi Danny
That snippet works, but ignores the defined rule of the box:
If page is = 25,26.
Hi Jan,
Wasn’t sure whether you wanted that. If you want to preserve the defined box rules, use the following.
function my_prefix_show_box_in_ie($show, $box_id) {
// change 123 to the ID of the box you want to show on IE only
if( $box_id !== 123 || $show === false ) {
return $show;
}
$show = preg_match('~MSIE|Internet Explorer~i', $_SERVER['HTTP_USER_AGENT']);
return $show;
}
add_action('stb_show_box', 'my_prefix_show_box_in_ie', 10, 2);