Hi @davelee
Within the loop of $rows, you could find out the status of the post like so:
<?php
// loop through the results
if( $rows )
{
foreach( $rows as $row )
{
if( get_post_status($row->post_id) != 'publish' )
{
continue;
}
// run code here
}
}
?>
Hope that helps.
Thanks
E