-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloop-no-posts.php
More file actions
53 lines (46 loc) · 1.5 KB
/
loop-no-posts.php
File metadata and controls
53 lines (46 loc) · 1.5 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
<?php
// Exit if accessed directly
if( !defined( 'ABSPATH' ) ) {
exit;
}
/**
* No-Posts Loop Content Template-Part File
*
* @file loop-no-posts.php
* @package Responsive
* @author Emil Uzelac
* @copyright 2003 - 2014 CyberChimps
* @license license.txt
* @version Release: 1.1.0
* @filesource wp-content/themes/responsive/loop-no-posts.php
* @link http://codex.wordpress.org/Templates
* @since available since Release 1.0
*/
/**
* If there are no posts in the loop,
* display default content
*/
$title = ( is_search() ? sprintf( __( 'Your search for %s did not match any entries.', 'responsive' ), get_search_query() ) : __( '404 — Fancy meeting you here!', 'responsive' ) );
if( responsive_pro_get_option( '404_title' ) ) {
$title = responsive_pro_get_option( '404_title' );
}
?>
<h1 class="title-404"><?php echo $title; ?></h1>
<?php
if( responsive_pro_get_option( '404_content' ) ) {
echo '<p>' . responsive_pro_get_option( '404_content' ) . '</p>';
}
else {
?>
<p><?php _e( 'Don't panic, we'll get through this together. Let's explore our options here.', 'responsive' ); ?></p>
<h6><?php
printf( __( 'You can return %s or search for the page you were looking for.', 'responsive' ),
sprintf( '<a href="%1$s" title="%2$s">%3$s</a>',
esc_url( get_home_url() ),
esc_attr__( 'Home', 'responsive' ),
esc_attr__( '← Home', 'responsive' )
)
);
?></h6>
<?php get_search_form();
} ?>