-
Notifications
You must be signed in to change notification settings - Fork 0
/
servicios_header.php
30 lines (30 loc) · 1.06 KB
/
servicios_header.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
30
<div class='services_header'>
<?php
$current_page = $wp_query->post;
$array = array('Diseno','Software','Marketing','OutSourcing','Asesoria');
$on = 'on';
$c = 0;
$c_aux = 0;
foreach ($array as $valor) {
$page = get_page_by_title($valor);
if($current_page->post_title != 'Servicios'){
$on = $current_page->ID == $page->ID?'on':'';
$c = $current_page->ID == $page->ID?$c_aux:$c;
}
$a = get_permalink($page->ID);
echo '<a class="logo hover ' . $on . '" href="' . $a . '"><span class="logos ' . $valor . ' hover"></span><span class="logos ' . $valor . ' hover1"></span><span class="aux"></span></a>';
$on = '';
$c_aux++;
}
?><div class='screen'><div class='reel' style='<?php //echo 'left:' . $c*(-835) . 'px'; ?>'><?php
$on = 'on';
foreach ($array as $valor) {
$page = get_page_by_title($valor);
$on = $current_page->ID == $page->ID?'on':'';
echo '<div class="item ' . $on . '"><h2 class="blue2">' . $page->post_title . '</h2>';
echo '<p>' . $page->post_content . '</p></div>';
$on = '';
}
?></div></div><?php
?>
</div>