[wp-hackers] Needed: More Elegant Solution for Using another "the loop"

Mark Jaquith mark.wordpress at txfx.net
Mon Oct 11 03:49:11 UTC 2004


Mark Shields wrote:

>I tried and it doesn't work (the breadcrumb would fail and it would
>break the real loop.  Is it possible I need to declare $post as a
>global?
>
Any variables you use in a function that are global need to be declared 
as global, yes.  And actually, it's $posts (plural) that would have to 
be global, not $post.  $post is just the foreach() of $posts... so if 
$posts can be pulled in, $post is created on the spot with the foreach().



More information about the hackers mailing list