Detect URL for If statement
-
In WordPress I would like to to show a custom header.php if the URL contains a specific string (in this case /support/ also to include /support/forums/). I have looked around and have tried many different combinations, but cannot seem to get it to work. Below is the code I have, any help would be greatly appreciated!!!
if (substr($_SERVER['REQUEST_URI'], 0, 5) !== '/support') { get_header('drive_doc'); } else { get_header(); }
FYI… I need it to work this way (I think) because I am using custom post types and therefore cannot use standard WordPress calls because it is just a slug and not a Post/Category/.etc.
Thanks!!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Detect URL for If statement’ is closed to new replies.