<?php

/*

* Custom feed (rss2)

*

* Web Traffic Genius Pro v3.5.4

* Copyright (c) 2008-2010

* Success on the Internet Pty Ltd

* PO Box 25

* Salisbury SA 5108

* Australia

* Phone: +61 422 512 549

* Fax: +61 8 8425 9657

* Web: http://www.webtrafficgenius.com

* Support: http://www.marketing-assassins.com

*

*/



function wtg_custom_feed_rss2() {

	header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);

	

	if ( have_posts()) {

		the_post();

	}

	else exit ;

	

	echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>



		

	<rss version="2.0"

		xmlns:content="http://purl.org/rss/1.0/modules/content/"

		xmlns:wfw="http://wellformedweb.org/CommentAPI/"

		xmlns:dc="http://purl.org/dc/elements/1.1/"

		xmlns:atom="http://www.w3.org/2005/Atom"

	>

	<channel>

		<title><?php the_title_rss() ?></title>

		<atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />

		<link><?php the_permalink_rss() ?></link>

		<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>

		<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></pubDate>

		<?php the_generator( 'rss2' ); ?>

		<language><?php echo get_option('rss_language'); ?></language>

		<item>

			<title><?php the_title_rss() ?></title>

			<link><?php the_permalink_rss() ?></link>

			<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate>

			<dc:creator><?php the_author() ?></dc:creator>

			<?php the_category_rss() ?>

			<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>

		<?php if ( strlen( $post->post_content ) > 0 ) : ?>

			<content:encoded><![CDATA[<?php the_content() ?>]]></content:encoded>

		<?php else : ?>

			<content:encoded><![CDATA[<?php the_excerpt_rss() ?>]]></content:encoded>

		<?php endif; ?>

	<?php endif; ?>

	<?php rss_enclosure(); ?>

		</item>

	</channel>

	</rss>

	<?php die();

}