-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhome_section.php
executable file
·115 lines (84 loc) · 3.7 KB
/
home_section.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!--BEGIN HOME SECTION -->
<div class="home-text-wrapper">
<?php
if ( ( $test_locations = get_nav_menu_locations() ) && $test_locations['main-menu'] ) {
$test_menu = wp_get_nav_menu_object( $test_locations['main-menu'] );
$test_menu_items = wp_get_nav_menu_items($test_menu->term_id);
$k = 0;
foreach($test_menu_items as $test_key => $test_item) {
if($test_item->object == 'page'){
$test_varpost = get_post($test_item->object_id);
$test_post_name = $test_varpost->post_name;
$test_separate_page = get_post_meta($test_item->object_id, "rnr_separate_page", true);
$test_disable_menu = get_post_meta($test_item->object_id, "rnr_disable_section_from_menu", true);
if ( $test_separate_page != true ) // && $test_disable_menu != true
{
if ($k==1) {
$home_link = "#" . $test_post_name;
break; // breaks foreach loop
}
$k++;
} // ends if block "separate page"
} // ends if block "is_page"
} // ends foreach loop
} // ends if block "menu locations"
global $smof_data;
if($smof_data['rnr_enable_home_logo']!= false) { ?>
<?php
if(!empty($smof_data['rnr_home_logo_url'])){ ?>
<div class="home-logo">
<a href="<?php echo $home_link; ?>/">
<img src="<?php echo $smof_data['rnr_home_logo_url']; ?>"
alt="<?php $home_link; ?>"
/>
</a>
</div>
<?php } else { ?>
<div class="home-logo-text <?php if($smof_data['rnr_home_logo_text_type']== '0') { echo 'light'; } ?>">
<a href="<?php echo $home_link; ?>"><?php echo $smof_data['rnr_home_logo_text']; ?></a>
</div>
<?php } ?>
<?php } ?>
<?php
if($smof_data['rnr_home_type']=="Video") { ?>
<?php the_content(); ?>
<a class="player" data-property="{videoURL: '<?php echo $smof_data['rnr_home_video_link'] ?>' ,
containment:'.background-video',
autoPlay:true,
mute:<?php echo $smof_data['rnr_enable_mute_video'] ?>,
startAt:0,
opacity:1,
ratio:'16/9',
addRaster:true}">
</a>
<?php }
else if($smof_data['rnr_home_type']=="Revolution Slider") { ?>
<div class="home-slider">
<?php if (get_post_meta( get_the_ID(), 'rnr_revolutionslider', true ) != '0') { ?>
<?php if(class_exists('RevSlider')){ putRevSlider(get_post_meta( get_the_ID(), 'rnr_revolutionslider', true )); } ?>
<?php } /* end slidertype = revslider */ ?>
</div>
<?php }
else if($smof_data['rnr_home_type']=="FullScreen Slider") { ?>
<div class="slider-text clearfix">
<div class="container">
<div class="sixteen columns">
<div id="slidecaption"></div>
</div>
<div class="sixteen columns">
<a id="prevslide" class="load-item"></a>
<a id="nextslide" class="load-item"></a>
</div>
</div>
</div>
<?php }
else if($smof_data['rnr_home_type']=="Boxed Content") { ?>
<div class="container">
<div class="sixteen columns">
<?php the_content(); ?>
</div>
</div>
<?php } else {
the_content();
} ?>
</div><!-- END HOME TEXT WRAPPER -->