get_post_fields as an excerpt

Give this a try. Basically, your get_posts looks OK, but you need to setup the post information. This leats you use the normal functions the_something and get_something without having to pass in a post object / ID each time. Just remember to call wp_reset_postdata(); anytime you use setup_postdata().

<?php $random_post = get_posts(array(
   'category'     => 'objects',
   'number posts' => 1,
   'orderby'      => 'rand',
   'post-type'    => 'post',
   'post_status'  => 'publish'
)); ?>

<?php if($random_post) : ?>
   <?php setup_postdata($featured_post); ?>

   <?php the_title('<h2>', '</h2>'); ?>
   <?php the_excerpt(); ?>
   ...etc...

   <?php wp_reset_postdata(); ?>
}

<?php endif; ?>

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)