get_posts loop outside ‘the loop’ don’t see post objects
-
Scenario:
-in the template but prior to the loop::
$extraposts = get_posts(‘yadda1=x&yadda2=y…’);
print_r($extraposts);
-plenty of posts are there
if $extraposts : foreach $extraposts as $post : start_wp();
…<?=some_core_or_plugin_function_doesn’t_matter();?>…
.
.
.
endfor; endif;
function some_core_or_plugin_function_doesn’t_matter() {
print_r($post);
-NOTHING
print_r($extraposts);
-NOTHING
}
I don’t get it. but this did work under 1.2
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘get_posts loop outside ‘the loop’ don’t see post objects’ is closed to new replies.