Where to put browser-detect.php?
-
I am trying to set the value of a php value depending on what browser is used. (Apologies if this is a very basic question, I am still learning… My site/theme is at https://www.vikingprincess.net)
My code is basically…
<?php include('browser_detection.php');?>
<?php $user_browser = browser_detection('browser');?>
<?php if ( $user_browser == 'msie' ) {$left_height=0; $right_height= 0;}?>
<?php if ( $user_browser == 'gecko' ) {$left_height=658; $right_height=658;}?>
…. then some code to adjust some heights.The problem is that I can’t get WP to pick up the php script. Where should I put it, and am I calling this script in the right way? Right now I’ve got the script in the themes/<themename> directory.
Where can I read about the file hierarchy of WP / I got curious about folders like wp-includes etc.. ?
Hope you can help!
(I am am with a broken rib and won’t be doing anything this New Years Eve.. other than finish of my WP theme hopefully! Very exciting! ?? HAPPY NEW YEAR EVERYBODY, particularly the excellent and helpful moderators on this forum)
- The topic ‘Where to put browser-detect.php?’ is closed to new replies.