Leo:
Are you using a page template? If yes, change it to this:
(get_query_var('page')) ? get_query_var('page') : 1;
Note that it’s page vs. paged.
For reference: http://codex.wordpress.org/Function_Reference/get_query_var
I was running a custom loop in a page template and it drove me nuts for several hours.
Thank you Kurt, this has been getting me for more than a few hours to say the least!
I changed “paged” to “page” and the loop still doesn’t respond. Testing, though, if I turn the “1” to a “2” things do respond. So I’ve isolated the problem to something in the get_query_far function.
Also, its worth noting that I’m not using this either in a page template or archive, but in a different area. Does that change the game at all?
Thanks for your help!
I might have gotten closer to the problem.
http://localhost/symbiostock_communicator.php/page/2/
print_r($_GET); returns empty array. So the URL rewriting isn’t happening?
This is being used on a special root-level script which is meant for other websites to dial in and get results. It includes wp-load.php. Perhaps this method is leaving out something crucial?
small update –
when I put up raw url variables like ?page=7 and skip get_url_var and just do $paged = ($_GET[‘paged’]) everything works fine.
Building for the long-term however I’m trying to avoid work-arounds.
I found this which states that including wp-load.php does not parse the URL or run the query: http://stackoverflow.com/questions/13860577/wordpress-wp-load-php
Otto says, don’t include wp-load.php: http://ottopress.com/2010/dont-include-wp-load-please/ implying that the script is not written in the best manner.
Thanks. I suspected that might have been a part of the problem.