forked from hakkens/davehakkens
-
Notifications
You must be signed in to change notification settings - Fork 0
/
navbar.php
29 lines (22 loc) · 922 Bytes
/
navbar.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
$current_url = $_SERVER["REQUEST_URI"];
?>
<div id="navbar">
<a href="<?php bloginfo( 'url' ); ?>">
<img id="logo" src="<?php bloginfo( 'template_url' ); ?>/img/logo.png">
</a>
<ul>
<li>
<a class="news<?php echo $current_url == '/' || strpos($current_url, 'news') || strpos($current_url, 'storyhopper') || strpos($current_url, 'phonebloks') || strpos($current_url, 'preciousplastic') ? ' current' : '' ; ?>" href="<?php bloginfo('url'); ?>/">News</a>
</li>
<li>
<a class="projects<?php echo $current_url == '/projects/' ? ' current' : '' ; ?>" href="/projects/">Projects</a>
</li>
<li>
<a class="about<?php echo $current_url == '/about/' ? ' current' : '' ; ?>" href="/about/">About</a>
</li>
<li>
<a class="community<?php echo strpos($current_url, 'community') ? ' current' : '' ; ?>" href="/community">Community</a>
</li>
</ul>
</div>