Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
comments_link_feed example
do_action
(
'rss2_head'
)
;
while
(
have_posts
(
)
)
:
the_post
(
)
;
?> <item> <title><?php
the_title_rss
(
)
; ?></title> <link><?php
the_permalink_rss
(
)
; ?></link> <?php
if
(
get_comments_number
(
)
||
comments_open
(
)
)
: ?> <comments><?php
comments_link_feed
(
)
; ?></comments> <?php
endif
; ?> <dc:creator><![CDATA[<?php
the_author
(
)
; ?>]]></dc:creator> <pubDate><?php
echo
mysql2date
(
'D, d M Y H:i:s +0000',
get_post_time
(
'Y-m-d H:i:s', true
)
, false
)
; ?></pubDate> <?php
the_category_rss
(
'rss2'
)
; ?> <guid isPermaLink="false"><?php
the_guid
(
)
; ?></guid> <?php
if
(
get_option
(
'rss_use_excerpt'
)
)
: ?> <description><![CDATA[<?php
the_excerpt_rss
(
)
; ?>]]></description> <?php
else
: ?> <description><![CDATA[<?php
the_excerpt_rss
(
)
; ?>]]></description>
else
{
/* translators: Comments feed title. %s: Site title. */
printf
(
ent2ncr
(
__
(
'Comments for %s'
)
)
,
get_wp_title_rss
(
)
)
;
}
?> </title> <subtitle type="text"><?php
bloginfo_rss
(
'description'
)
; ?></subtitle> <updated><?php
echo
get_feed_build_date
(
'Y-m-d\TH:i:s\Z'
)
; ?></updated> <?php
if
(
is_singular
(
)
)
: ?> <link rel="alternate" type="<?php
bloginfo_rss
(
'html_type'
)
; ?>" href="<?php
comments_link_feed
(
)
; ?>" /> <link rel="self" type="application/atom+xml" href="<?php
echo
esc_url
(
get_post_comments_feed_link
(
'', 'atom'
)
)
; ?>" /> <id><?php
echo
esc_url
(
get_post_comments_feed_link
(
'', 'atom'
)
)
; ?></id> <?php
elseif
(
is_search
(
)
)
: ?> <link rel="alternate" type="<?php
bloginfo_rss
(
'html_type'
)
; ?>" href="<?php
echo
home_url
(
)
. '?s=' .
get_search_query
(
)
; ?>" /> <link rel="self" type="application/atom+xml" href="<?php
echo
get_search_comments_feed_link
(
'', 'atom'
)
; ?>" /> <id><?php
echo
get_search_comments_feed_link
(
'', 'atom'
)
; ?></id> <?php
else
: ?> <link rel="alternate" type="<?php
bloginfo_rss
(
'html_type'
)
; ?>" href="<?php
bloginfo_rss
(
'url'
)
; ?>" /> <link rel="self" type="application/atom+xml" href="<?php
bloginfo_rss
(
'comments_atom_url'
)
; ?>" /> <id><?php
bloginfo_rss
(
'comments_atom_url'
)
; ?></id> <?php
endif
; ?>