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
<?php
$description = '';
if( isset( $post->ID ) ){
$meta = get_post_meta( $post->ID, 'offshore_options', true );
} else {
$meta = array();
}
if( !is_single() || 'career' == get_post_type() || 'services' == get_post_type() ){
if( isset( $meta['description'] ) && !is_archive() ){
$description = $meta['description'];
} else {
$description = '';
}
}
if( is_front_page() ){
if( !isset( $meta['rev_slider'] ) || isset( $meta['rev_slider'] ) && $meta['rev_slider'] == 'no' ){
if( !isset( $meta['rev_slider_alias'] ) || isset($meta['rev_slider_alias']) && $meta['rev_slider_alias'] == '' ){
?>
<div style="background-image:url(<?php echo get_template_directory_uri(); ?>/images/slider1.jpg);background-size:cover;background-repeat:no-repeat;min-height:500px;">
<h1 class="text-center" style="padding:0;margin:0;padding-top:200px;color:#fff;"> Import slider and select it under page options </h1>
</div>
<?php
}
if( shortcode_exists("rev_slider") && isset( $meta['rev_slider_alias'] ) && $meta['rev_slider_alias'] != '' ){
echo do_shortcode('[rev_slider alias="' . $meta['rev_slider_alias'] . '"]');
}
}
} else {
?>
<!-- Page Title -->
<div class="page-title text-center">
<?php
if( is_single() ){
the_title( '<h2 class="title">', '</h2>', true );
} elseif( is_search() ) {
echo '<h2 class="title">' . esc_html__( 'Search Results', 'offshore' ) . '</h2>';
} else {
echo '<h2 class="title">'; wp_title( '' ); echo '</h2>';
}
if( is_single() && 'career' != get_post_type() && 'services' != get_post_type() ){
get_template_part( 'parts/part', 'postmetadata' );
} else { ?>
<p class="description light">
<?php
$allowed_tags = array(
'a' => array(
'href' => array(),
'title' => array()
),
'br' => array(),
'em' => array(),
'strong' => array()
);
echo wp_kses( $description, $allowed_tags );
?>
</p>
<?php } ?>
</div>
<!-- Page Title -->
<?php }