Support » Fixing WordPress » Podcast XML Using WordPress Query

  • I know podpress is an easy to use plugin, but its also huge and I just wanted to just create a taxonomy (yes or no) and write one little podcast xml file to query posts checked as “yes”. Then a custom field to grab the file’s url of the podcast.

    I’m a designer so it wasn’t immediately obvious to me that using php inside an XML file wouldn’t work. Is there anyway this or something simple and similar to this would be possible? This is what I was gonna do.

    <?xml version="1.0" encoding="UTF-8"?>
    <rss xmlns:itunes="" version="2.0">
    <title>Website Title</title>
    <itunes:name>Website Name</itunes:name>
    <itunes:image href="" />
    <itunes:category text="Sports & Recreation">
    <itunes:category text="Am" />
    <?php if (have_posts()) : ?>
    <?php query_posts(array( 'post_type'=>'post', 'podcast'=>$term->yes)); ?>
    <?php while (have_posts()) : the_post(); ?>
    <title><?php the_title(); ?></title>
    <itunes:author>ONE Blade Mag</itunes:author>
    <itunes:subtitle><?php wpe_excerpt(''); ?></itunes:subtitle>
    <itunes:summary><?php wpe_excerpt(''); ?></itunes:summary>
    <enclosure url="<?php echo $podcasturl; ?>"/>
    <pubDate><?php the_time() ?></pubDate>
    <?php endwhile; ?>
    <?php else : endif; ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Podcast XML Using WordPress Query’ is closed to new replies.