-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path404.php
41 lines (33 loc) · 1.03 KB
/
404.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
<?php
/**
* The 404 Not Found template.
*
* Used when WordPress encounters an unknown URL.
*
* @package F1 Growth10
* @author Factor1 Studios
* @since 0.1.0
*/
// 404 Custom Fields
$bg = wp_get_attachment_image_src(get_field('404_background', 'option'), 'home_hero');
$content = get_field('404_content', 'option');
$btn = get_field('404_button', 'option');
get_header(); ?>
<section class="error-404" style="background: url('<?php echo $bg[0]; ?>') center/cover no-repeat">
<div class="container">
<div class="row">
<div class="col-10 sm-col-11 col-centered">
<?php echo $content;
// Optional button
if( $btn ) : ?>
<div class="text-center">
<a href="<?php echo esc_url($btn['url']); ?>" class="button button--ghost" role="link" title="<?php echo $btn['title']; ?>" target="<?php echo $btn['target']; ?>">
<?php echo $btn['title']; ?>
</a>
</div>
<?php endif; ?>
</div>
</div>
</div>
</section>
<?php get_footer(); ?>