This repository has been archived by the owner on May 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathindex.php
executable file
·68 lines (53 loc) · 2.04 KB
/
index.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
<?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.
* For example, it puts together the home page when no home.php file exists.
*
* @link http://codex.wordpress.org/Template_Hierarchy
*
* @package Designer
* @link https://themebeans.com/themes/designer
*/
get_header();
$placeholder = get_parent_theme_file_uri( '/assets/images/placeholder.png' ); ?>
<div class="index-content hfeed">
<?php if ( is_search() ) { ?>
<?php if ( ! have_posts() ) { ?>
<h1 class="entry-title">
<?php printf( esc_html__( 'Nothing Found', 'designer' ) ); ?>
</h1>
<p><?php printf( esc_html__( 'Sorry, but we couldn't find anything for "%s". Please try again.', 'designer' ), get_search_query() ); ?></p>
<form method="get" id="searchform" class="searchform search" action="<?php echo esc_url( home_url( '/' ) ); ?>/">
<input type="text" name="s" id="s" value="<?php esc_attr_e( 'To search type & hit enter', 'designer' ); ?>" onfocus="if(this.value=='<?php esc_attr_e( 'To search type & hit enter', 'designer' ); ?>')this.value='';" onblur="if(this.value=='')this.value='<?php esc_attr_e( 'To search type & hit enter', 'designer' ); ?>';" />
</form>
<?php } ?>
<?php } ?>
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/post-loop' );
endwhile;
endif;
?>
<div class="project-pagination clearfix">
<?php
next_posts_link(
"<div class='project square-link prev'>
<div class='thumb'> <h3 class='title'><span></span></h3><img src='$placeholder'><div class='overlay'></div></div>
</div>"
);
previous_posts_link(
"<div class='project square-link next'>
<div class='thumb'><h3 class='title'><span></span></h3><img src='$placeholder'><div class='overlay'></div></div>
</div>"
);
?>
</div>
</div>
<?php
get_footer();