'wplt_tick', 'tax_query' => array( array( 'taxonomy' => 'wplt_ticker', 'field' => 'slug', 'terms' => $arguments['ticker_slug'] ) ) ); global $wpdb; $sql = "SELECT `ID`, DATE_FORMAT(`post_date`,'%a, %d %b %Y %T') AS `post_date_rfc`, `post_content`, `post_title` FROM `".$wpdb->prefix."posts` WHERE `post_type` = 'wplt_tick' AND `post_status` = 'publish' ORDER BY `post_date` DESC;"; $entries = $wpdb->get_results($sql); date_default_timezone_set("Europe/Berlin"); // modify header information header("Content-Type: application/rss+xml; charset=UTF-8"); // generate file head $rss = ''; $rss .= ''; $rss .= 'Lager Live'; $rss .= 'http://'.$_SERVER['SERVER_NAME'].'/lagerticker'; $rss .= ''; $rss .= ''; $rss .= 'de-de'; $rss .= ''.date("r").''; // build entries foreach ( $entries as $entry ) { //print_r($entry); $rss .= ''.$entry->post_title.''; $rss .= 'http://www.dpsg-hardenberg.org/lagerticker'; $rss .= ''.$entry->post_date_rfc.' '.date('O').''; $rss .= 'post_content.']]>'; } // generate document foot $rss .= ''; print $rss; }