Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Excerpts, Read more, Pagination »

[SOLVED] Preserving next/previous navigation with query_posts

Old Aug 5, 2009, 07:56 AM
5 posts · Jun 2009

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:

<?php /* expat.cl */ if(is_front_page()) { userfn_ignore_directory_posts(); } ?>
That function, located in a separate file, is:

* 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;
	query_posts(array('category__not_in' => $catarray, 'paged' => $pagenum));
As far as the category exclusion goes, the function works.

Old Aug 5, 2009, 08:01 AM
5 posts · Jun 2009
Never mind... I just saw that I killed the solution by changing a variable name. It works now.

Great theme


navigation, next/previous, pagination

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Home Link in Next/Previous not working turbojesse Atahualpa 3 Wordpress theme 5 Aug 20, 2009 08:27 PM
[SOLVED] How to style the Previous/Next Navigation links Fux Header configuration & styling 6 Aug 16, 2009 08:41 AM
[SOLVED] After Update 3.4: Problem: Error with Next/Previous Navigation, No Postings! Doc GermaniCus New Versions, & Updating 6 Jul 15, 2009 02:13 PM
[SOLVED] How do I move next/previous navigation to the bottom of the post evany Post-Kicker, -Byline & -Footer 1 Jun 7, 2009 06:41 AM
next and previous navigation in the consulted category lkjc Page & Category Menu Bars 4 Jun 1, 2009 05:25 PM

All times are GMT -6. The time now is 10:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.