-
Notifications
You must be signed in to change notification settings - Fork 184
/
Copy pathtemplate-fullrss.php
47 lines (39 loc) · 1.37 KB
/
template-fullrss.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
<?php
/*
Template Name: Full RSS
*/
header('Content-type: application/rss+xml');
echo '<?xml version="1.0" encoding="UTF-8"?>';
?>
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
<channel>
<title>Lemúrinn</title>
<link>https://lemurinn.is</link>
<description>tímarit um allt</description>
<lastBuildDate>Thu, 15 Dec 2018 20:50:21 +0000</lastBuildDate>
<language>is</language>
<image>
<title>Lemúrinn</title>
<url>https://lemurinn.is/wp-content/themes/lemur2013/assets/images/lemur-fb-icon.jpg</url>
<link>https://lemurinn.is</link>
<width>760</width>
<height>760</height>
<description>Lemúrinn er furðuleg vera, rétt eins og náfrændi hans maðurinn.</description>
</image>
</channel>
<?php
$wpb_all_query = new WP_Query(array('post_type'=>'post', 'post_status'=>'publish', 'posts_per_page'=>100000));
?>
<?php if ( $wpb_all_query->have_posts() ) : ?>
<!-- the loop -->
<?php while ( $wpb_all_query->have_posts() ) : $wpb_all_query->the_post(); ?>
<item>
<title><?php the_title(); ?></title>
<link><?php the_permalink(); ?></link>
<pubDate><?php echo get_the_date('c'); ?></pubDate>
</item>
<?php endwhile; ?>
<!-- end of the loop -->
<?php wp_reset_postdata(); ?>
<?php endif; ?>
</rss>