try this
<?php
$new=new WP_Query(array('posts_per_page'=> 1,'order_by'=>'DESC'));
$max_id;
if($new->have_posts()){
while($new->have_posts())
{
$new->the_post();
$max_id=the_id();
}
}
echo $max_id;
try this
<?php
$new=new WP_Query(array('posts_per_page'=> 1,'order_by'=>'DESC'));
$max_id;
if($new->have_posts()){
while($new->have_posts())
{
$new->the_post();
$max_id=the_id();
}
}
echo $max_id;