• How to use WordPress loop with xml markup in php files? Maybe like this:

    <?php
    header("Content-type: text/xml");
    echo '<?xml version="1.0" encoding="utf-8" ?>
    global $post;
    query_posts('cat=$cat&posts_per_page=$limit'); if( have_posts() ) : while( have_posts() ) : the_post();
    echo '<Image Filename="'.$my_image.'">';
    echo '<inline>'.$content.'</inline>';
    echo '</Image>';
    endwhile; endif; ?>

    But this doesn’t work.
    Code is not real, just for post. Thanks.

The topic ‘How to use WordPress loop with xml markup?’ is closed to new replies.