$custom_self = $_SERVER["REQUEST_URI"];
if(substr($custom_self, 0, 9) == "/contact/") {
if($_GET['formsent'] == "yes") {
?>
} else { ?>
}}
?>
if($custom_self == "/") {
?>
$how_many=1; //How many posts do you want to show
require_once("wp-config.php"); // Change this for your path to wp-config.php file
$news=$wpdb->get_results("SELECT `ID`,`post_title`,`post_date` FROM $wpdb->posts
WHERE `post_type`=\"post\" AND `post_status`= \"publish\" ORDER BY 'ID' DESC LIMIT ".$how_many);
foreach($news as $np){
$custom_post_date = $np->post_date;
$cpd_str = substr($custom_post_date, 0, 10);
$ex_cpd_str = explode("-", $cpd_str);
$display_cpd = date('M. j, Y', mktime(0, 0, 0, $ex_cpd_str[1], $ex_cpd_str[2], $ex_cpd_str[0]));
?>
- |
} ?>
} ?>