-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
executable file
·120 lines (119 loc) · 3.9 KB
/
Copy pathindex.php
File metadata and controls
executable file
·120 lines (119 loc) · 3.9 KB
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
<?php
/**
* The main template file
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @package same
*/
get_header();
?>
<section id="content">
<div class="wrapper page_text">
<?php
if ( is_home() ) :
?>
<?php get_template_part( 'breadcrumbs' ); ?>
<h1 class="page_title"><?php esc_html_e( 'Blog', 'same' ); ?></h1>
<div class="columns">
<div class="column column75">
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
?>
<?php
if ( ! in_category( 'company' ) ) :
?>
<article class="article">
<div class="article_image nomargin">
<div class="inside">
<?php the_post_thumbnail(); ?>
</div>
</div>
<div class="article_details">
<ul class="article_author_date">
<li><em><?php esc_html_e( 'Add:', 'same' ); ?></em> <?php the_time( 'd.m.Y' ); ?></li>
<li><em><?php esc_html_e( 'Author:', 'same' ); ?></em>
<a href="<?php echo esc_attr( get_author_posts_url( $post->post_author ) ); ?>" ><?php the_author(); ?></a></li>
</ul>
<p class="article_comments"><em><?php esc_html_e( 'Comment: ', 'same' ); ?>
</em><?php comments_number( '0', '1', '%' ); ?></p>
</div>
<h1><?php the_title(); ?></h1>
<?php the_content( '' ); ?>
<a class="button button_small button_orange float_left" href="<?php the_permalink(); ?>">
<span class="inside"><?php esc_html_e( 'read more', 'same' ); ?></span></a>
</article>
<?php endif; ?>
<?php endwhile; ?>
<?php else : ?>
<article class="article">
<p><?php esc_html_e( 'Nothing yet', 'same' ); ?></p>
</article>
<?php endif; ?>
</div>
<?php else : ?>
<?php get_template_part( 'breadcrumbs' ); ?>
<div class="columns">
<div class="column column75">
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
?>
<article class="article">
<h1><?php the_title(); ?></h1>
<?php
if ( has_post_thumbnail() ) :
?>
<div class="article_image nomargin">
<div class="inside">
<?php the_post_thumbnail(); ?>
</div>
</div>
<?php
elseif ( get_field( 'case_main_photo' ) ) :
?>
<div class="inside">
<?php
echo wp_get_attachment_image( get_field( 'case_main_photo' )['ID'], 'medium' );
?>
</div>
<?php endif; ?>
<div class="article_details">
<ul class="article_author_date">
<li><em><?php esc_html_e( 'Add:', 'same' ); ?></em> <?php the_time( 'd.m.Y' ); ?></li>
<li><em><?php esc_html_e( 'Author:', 'same' ); ?></em>
<a href="<?php echo esc_attr( get_author_posts_url( $post->post_author ) ); ?>"><?php the_author(); ?></a></li>
</ul>
</div>
<?php
if ( has_excerpt() ) :
the_excerpt();
else :
the_content( '' );
endif;
?>
<a class="button button_small button_orange float_left" href="<?php the_permalink(); ?>">
<span class="inside"><?php esc_html_e( 'read more', 'same' ); ?></span></a>
</article>
<?php endwhile; ?>
<?php else : ?>
<article class="article">
<p><?php esc_html_e( 'Nothing yet', 'same' ); ?></p>
</article>
<?php endif; ?>
</div>
<?php
endif;
get_sidebar();
?>
</div>
</div>
</section>
<?php
get_footer();