I'm using query_posts to exclude a category subtree from my home page, which is breaking next/previous navigation (http://expat.cl/page/2 shows the same posts as http://expat.cl/).
It appears that this is the issue: http://stylizedweb.com/2008/08/13/qu...ation-problem/
I implemented the solution shown on that page, but the behavior remains. Since I'm new to WordPress and PHP, before I start hacking away at Atahualpa I thought I'd run the issue by you all- I may just need a simple correction. I'm using WP 2.8.2 and Atahualpa 3.4.2.
In ATO->Content ABOVE the LOOP I've added:
Code:
<?php /* expat.cl */ if(is_front_page()) { userfn_ignore_directory_posts(); } ?>
Code:
/*
* Exclude posts belonging to Directory subcategories from Loop
* For use on front page
*/
function userfn_ignore_directory_posts() {
$pagenum = (get_query_var('pagenum')) ? get_query_var('pagenum') : 1; // preserve pagination
$dircats = get_categories('child_of=3'); // array of subcategories of Directory
$catarray = array();
$i = 0;
foreach ($dircats as $cat) { // comma-separated list of negated categories
$catarray[$i] = $cat->term_id;
$i++;
}
query_posts(array('category__not_in' => $catarray, 'paged' => $pagenum));
}
Thanks,
Becca








Hybrid Mode
