-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive-project.php
121 lines (88 loc) · 4.62 KB
/
archive-project.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
<?php
/**
* The template for displaying archive pages
*
* Used to display archive-type pages if nothing more specific matches a query.
* For example, puts together date-based pages if no date.php file exists.
*
* If you'd like to further customize these archive views, you may create a
* new template file for each one. For example, tag.php (Tag archives),
* category.php (Category archives), author.php (Author archives), etc.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Twenty_Sixteen
* @since Twenty Sixteen 1.0
*/
get_header(); ?>
<div class="wrap">
<div id="primary" class="content-area archive-custom-post-type archive-project-post-type">
<main id="main" class="site-main" role="main">
<header class="archive-project-header">
<div class="title"><h4><?php _e("Done Projects","mafiran");?></h4></div>
<div class="spr-general"></div>
</header>
<?php
if ( have_posts() ) : ?>
<div class="row carchive-inner-content-container">
<?php
/* Start the Loop */
while ( have_posts() ) : the_post();
?>
<div class="col-sm-6 carchive-post-item">
<article id="post-<?php the_ID(); ?>" <?php post_class('post custom-post-item'); ?>>
<?php if ('' !== get_the_post_thumbnail() && !is_single()) : ?>
<div class="post-thumbnail">
<?php
$attachment_id = get_post_thumbnail_id();
$img = get_sed_attachment_image_html( $attachment_id , "" , "600X400" );
?>
<?php
if ( $img ) {
echo $img['thumbnail'];
}
?>
<div class="info">
<div class="info-inner">
<a href="<?php the_permalink(); ?>" class="info-icons"><i class="fa fa-plus"></i></a>
</div>
</div>
</div>
<?php endif; ?>
<header class="entry-header entry-header--archive">
<div class="entry-title"><?php the_title(); ?></div>
<div class="entry-content">
<?php
$post_content = get_the_excerpt();
$post_content = apply_filters( 'the_excerpt' , $post_content );
$excerpt_length = 90;
$post_content = strip_tags( $post_content );
if( strlen( $post_content ) > $excerpt_length ){
$post_content = mb_substr( $post_content, 0, $excerpt_length ) . "...";
}
echo $post_content;
//the_content();
?>
</div>
</header>
</article>
</div>
<?php
endwhile;
?>
</div>
<?php
the_posts_pagination( array(
'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous page', 'twentyseventeen' ) . '</span>',
'next_text' => '<span class="screen-reader-text">' . __( 'Next page', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyseventeen' ) . ' </span>',
) );
else :
get_template_part( 'template-parts/post/content', 'none' );
endif; ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
</div><!-- .wrap -->
<?php get_footer();