make diffrent template on last six post published
As written, you are checking the total post count against your counter. That is, $wp_query is the total post count for the query not the per page count. Now, assume 30 posts total in the query with 10 posts per page. Your counter starts and will get all the way to 10, but $ctr < … Read more