3 Columns, 3 Categories, One Archive, and Pagination

OK this is what I ended up with, that works well: // get paged value. $paged = get_query_var( ‘paged’ ); $maxPages = array(); $max = 0; // Create the queries $soundPosts = new WP_Query(‘posts_per_page=1&cat=4&paged=’ . $paged); $viewsPosts = new WP_Query(‘posts_per_page=1&cat=5&paged=’ . $paged); $wordsPosts = new WP_Query(‘posts_per_page=1&cat=6&paged=’ . $paged); // get max number of pages for … Read more

WordPress pagination showing same posts on each page

You can replace the code with something like this <?php global $wp_query; $limit = get_option(‘posts_per_page’); $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; query_posts(array(‘posts_per_page’=>$limit,’paged’=>$paged,’category_name’=>’albertsons, carrs, dominicks, genuardis, heb, kroger, pavillions, publix, randalls,safeway,shop-rite,tom-thumb,vons,whole-foods’)); /* you may want to uncomment the below two lines if you are using custom page template*/ //$wp_query->is_archive = true; //$wp_query->is_home = false; then … Read more

Getting content from a single *page* of a post

This should do the trick: /** * For posts paginated using <!–nextpage–>, return a particular “page” of content. * This function uses code from WP’s setup_postdata() function. * @param string $content the content to search for paginated page content. * @param int $page_number the index of the page to return the content for. */ function … Read more

Pagination on 2nd loop

The issue is that before your custom queries load, WordPress runs the main taxonomy query (all results in that tax term, 10 per page). On page 6, the main query is trying to load posts 51-60, and since they don’t exist the page 404’s before you have a chance to load your custom query. Customize … Read more

How to add pagination to my code?

Add this to functions.php: // Pagination function pagination($pages=””, $range = 4) { $showitems = ($range * 2)+1; global $paged; if(empty($paged)) $paged = 1; if($pages == ”) { global $wp_query; $pages = $wp_query->max_num_pages; if(!$pages) { $pages = 1; } } if(1 != $pages) { echo “<div class=\”pagination\”><span>Page “.$paged.” of “.$pages.”</span>”; if($paged > 2 && $paged > … Read more

Hide featured post on second page

In short no – the template used is based on the query, and when paginating you are essentially repeating the same query, but for a different page. In general the template will be the same. archive.php can be used for most queries, but often preferable templates exist (e.g. category templates, tag templates, author templates etc.). … Read more

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