-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-pentecost.php
65 lines (62 loc) · 1.13 KB
/
page-pentecost.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
<?php
/*
Template Name: pentecost
*/
echo __FILE__.'<br/>';
?>
<doctype html>
<head>
<title>
page-pentecost
</title>
<style>
<?php
$IDs = [
'none' => 0,
'legio' => 466,
'school' => 467,
'mass' => 468,
'pigeon' => 464,
'music' => 465,
];
$id = $IDs['none'];
$background_image = wp_get_attachment_image_src( $id )[0];
?>
body {
background-color: #b0c4de;
background-image: url('<?php echo $background_image; ?>');
color: #556B2F; /* DarkOliveGreen */
}
</style>
</head>
<body>
<?php
//$post = get_post();
//var_dump( $post );
echo $post->post_title.'<br/>';
echo $post->post_content;
function show_attachment_file_list( $cat )
{
$args = [
'post_type' => 'attachment',
'numberposts' => -1,
'post_status' => null,
'category_name' => $cat
];
$attachments = get_posts( $args );
foreach( $attachments as $attachment ):
echo '<ul>';
?>
<a href='<?php echo get_attachment_link( $attachment->ID ); ?>'>
<?php echo $attachment->post_title ?>
<?php echo get_attached_file( $attachment->ID ); ?>
</a>
<?php
echo '</ul>';
endforeach;
}
show_attachment_file_list( 'pentecost' );
// show_attachment_file_list( 'alfonso' );
?>
</body>
</html>