Making next_posts_link(); return posts by month

You have to modify the query that selects the posts to select by month. This bit of code placed in the template will get the page number and subtract that from the current month. <?php $page = get_query_var(‘paged’) ? get_query_var(‘paged’) : 1; $subtractor = $page-1; $date = date(“Y-m-d H:i:s”); $current_month = date(‘n’, strtotime($date.’-‘.$subtractor.’months’)); $current_year = … Read more

next_posts_link not working in custom loop

only just use echo and get_ <?php $args = array( ‘post_type’ => ‘post’, ‘posts_per_page’ => 1 ); $my_query = null; $my_query = new WP_Query($args); if( $my_query->have_posts() ) { $i = 0; while ($my_query->have_posts()) : $my_query->the_post(); if($i % 2 == 0) { ?> <div class=”row”><?php } ?> <div class=”col-md-6″> <div class=”overview”> <!– Post details here –> … Read more

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