This repository has been archived by the owner on Aug 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-portfolio.php
93 lines (74 loc) · 2.55 KB
/
single-portfolio.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
<?php
/**
* Template for displaying single portfolio items
*
* @package MIXT
*/
get_header();
while ( have_posts() ) : // Start The Loop
the_post();
get_template_part( 'templates/content', 'portfolio' );
// Get project page options
$options = mixt_get_options( array(
'project-tags' => array(),
'project-sharing' => array(),
'project-navigation' => array(),
'project-about-author' => array(),
'project-related' => array(),
'project-comments' => array(),
) );
// Project Taxonomies
if ( $options['project-tags'] ) {
$types = get_the_term_list($post->ID, 'project-type', '<p class="tag-list"><strong>' . esc_html__( 'Type:', 'mixt' ) . '</strong>', '', '</p>');
$attrs = get_the_term_list($post->ID, 'project-attribute', '<p class="tag-list"><strong>' . esc_html__( 'Attributes:', 'mixt' ) . '</strong>', '', '</p>');
if ( $types != '' || $attrs != '' ) {
echo '<footer class="entry-footer post-tags post-extra">' . $types . $attrs . '</footer>';
}
}
// Post Social Sharing Buttons
if ( $options['project-sharing'] ) {
$profiles = array();
$sel_profiles = mixt_get_option( array( 'key' => 'project-sharing-profiles', 'return' => 'value' ) );
$set_profiles = mixt_get_option( array( 'key' => 'social-sharing-profiles', 'return' => 'value' ) );
// Build array of selected sharing profiles
if ( ! empty($sel_profiles) ) {
if ( empty($set_profiles) ) {
$set_profiles = mixt_preset_social_profiles('sharing');
}
foreach ( $set_profiles as $key => $profile ) {
if ( ! empty($sel_profiles[$key]) ) $profiles[$key] = $profile;
}
}
$icons = mixt_social_profiles(false, array(
'type' => 'sharing',
'style' => 'group',
'profiles' => $profiles,
'class' => 'post-share btn-group-justified',
));
if ( $icons != '' ) {
echo '<div class="post-extra post-share-cont">';
echo mixt_heading( esc_html__( 'Share this', 'mixt' ) );
echo mixt_clean($icons);
echo '</div>';
}
}
// Post Navigation
if ( $options['project-navigation'] ) {
mixt_content_nav('post-nav');
}
// About The Author
if ( $options['project-about-author'] ) {
mixt_about_the_author();
}
// Related Posts
if ( $options['project-related'] ) {
mixt_related_posts('project', esc_html__( 'Other Projects', 'mixt' ));
}
// Comments
if ( $options['project-comments'] && ( comments_open() || '0' != get_comments_number() ) ) {
comments_template('/templates/comments.php');
}
endwhile; // End The Loop
get_sidebar();
get_footer();
?>