next_posts_link and previous_posts_link problem

When using custom post types I got around this problem by using the following code. Of course you will need to put in the HTML for how you want it to display on your site.

<?php 

    $temp = $wp_query;
    $wp_query= null;
    $wp_query = new WP_Query();
    $wp_query->query(''); // Enter you query here

 ?>

<?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>

// Post body

<?php endwhile; ?>

<?php previous_posts_link('Previous page'); ?>
<?php next_posts_link('Next page'); ?>

<?php $wp_query = null; $wp_query = $temp;?>

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