-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-orbis_company.php
executable file
·126 lines (87 loc) · 3.19 KB
/
single-orbis_company.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
116
117
118
119
120
121
122
123
124
125
126
<?php get_header(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="row">
<div class="col-md-8">
<?php do_action( 'orbis_before_main_content' ); ?>
<div class="panel">
<header>
<h3><?php _e( 'Description', 'orbis' ); ?></h3>
</header>
<div class="content">
<?php the_content(); ?>
</div>
</div>
<?php get_template_part( 'templates/company_sections' ); ?>
<?php do_action( 'orbis_after_main_content' ); ?>
<?php comments_template( '', true ); ?>
</div>
<div class="col-md-4">
<?php do_action( 'orbis_before_side_content' ); ?>
<?php if ( function_exists( 'p2p_register_connection_type' ) ) : ?>
<div class="panel">
<header>
<h3><?php _e(' Connected persons', 'orbis' ); ?></h3>
</header>
<?php
$connected = new WP_Query( array(
'connected_type' => 'orbis_persons_to_companies',
'connected_items' => get_queried_object(),
'nopaging' => true,
) );
if ( $connected->have_posts() ) : ?>
<ul class="post-list">
<?php while ( $connected->have_posts() ) : $connected->the_post(); ?>
<li>
<a href="<?php the_permalink(); ?>" class="post-image">
<?php if ( has_post_thumbnail() ) : ?>
<?php the_post_thumbnail( 'avatar' ); ?>
<?php else : ?>
<img src="<?php bloginfo( 'template_directory' ); ?>/placeholders/avatar.png" alt="">
<?php endif; ?>
</a>
<div class="post-content">
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <br />
<p>
<?php if ( get_post_meta( $post->ID, '_orbis_person_email_address', true ) ) : ?>
<span><?php echo esc_html( get_post_meta( $post->ID, '_orbis_person_email_address', true ) ); ?></span> <br />
<?php endif; ?>
<?php if ( get_post_meta( $post->ID, '_orbis_person_phone_number', true ) ) : ?>
<span><?php echo esc_html( get_post_meta( $post->ID, '_orbis_person_phone_number', true ) ); ?></span>
<?php endif; ?>
</p>
</div>
</li>
<?php endwhile; ?>
</ul>
<?php wp_reset_postdata(); else : ?>
<div class="content">
<p class="alt">
<?php _e( 'No persons connected.', 'orbis' ); ?>
</p>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php get_template_part( 'templates/company_twitter' ); ?>
<div class="panel">
<header>
<h3><?php _e( 'Additional Information', 'orbis' ); ?></h3>
</header>
<div class="content">
<dl>
<dt><?php _e( 'Posted on', 'orbis' ); ?></dt>
<dd><?php echo esc_html( get_the_date() ); ?></dd>
<dt><?php _e( 'Posted by', 'orbis' ); ?></dt>
<dd><?php echo esc_html( get_the_author() ); ?></dd>
<dt><?php _e( 'Actions', 'orbis' ); ?></dt>
<dd><?php edit_post_link( __( 'Edit', 'orbis' ) ); ?></dd>
</dl>
</div>
</div>
<?php do_action( 'orbis_after_side_content' ); ?>
</div>
</div>
</div>
<?php endwhile; ?>
<?php get_footer(); ?>