-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.php
71 lines (59 loc) · 1.58 KB
/
home.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
<?php
/**
* Template Name: Portfolio Page
*
* The template for displaying portfolio
*
* This is the template that displays all portfolio items.
*
* @package DesignFly
*
* @since 1.0.3
*
*/
get_header();
?>
<div id="primary" class="content-area">
<main id="main" class="site-main">
<?php
$args = array(
'post_type' => 'df-portfolio',
'posts_per_page' => '6',
);
$query = new WP_Query( $args );
if ( get_theme_mod( 'designfly-home-display-portfolio' ) === true ): ?>
<div id="portfolio-wrapper_home">
<!-- top bar -->
<div class="portfolio-wrapper_home-top">
<p class="title"> <?php echo esc_html( get_theme_mod( 'designfly-home-portfolio-title', 'd\'sign is the soul' ) ); ?> </p>
<a href=" <?php echo get_permalink( get_theme_mod( 'designfly-home-portfolio-btn', '#' ) ); ?>" id="portfolio-view-all">
<?php esc_html_e( 'view all', 'designfly' ); ?>
</a>
<hr />
</div>
<?php
if ( $query -> have_posts() ):
while ( $query -> have_posts() ):
$query -> the_post();
get_template_part( 'template-parts/content', 'df-portfolio' );
endwhile;
?>
</div>
<?php
else:
?>
<div class="container">
<p>
<?php esc_html_e( 'Sorry, no portfolio items found. Please add some portfolio items in admin-dashboard>Portfolio.
If you don\'t want to see this message, uncheck \'Show recent portfolio items\' in admin-dashboard>Appearance>Customize>Home Page settings.', 'designfly' ); ?>
</p>
</div>
<?php
endif;
endif;
?>
</main><!-- #main -->
</div><!-- #primary -->
<?php
get_footer();
?>