[wp-hackers] Scope for functions in a theme
Christine Davis
christine at neato.co.nz
Sun Nov 11 00:07:34 GMT 2007
Where I've needed to do this before, I've done an include of
wp-blog-header.php at the top of the code (it lives at the root of the
wordpress directory. Adjust the path accordingly).
On 11/11/07, Mindshare Studios <info at mindsharestudios.com> wrote:
>
> Hello,
>
> I'm working on a theme in which I would like to generate some XML using
> get_posts:
>
> <?php foreach(get_posts('category=3') as $post) : ?>
> <state id="point">
> <name><?php the_title() ?></name>
> </state>
> <?php endforeach; ?>
>
> The file calling get_posts returns the error "Fatal error: Call to
> undefined
> function: get_posts()". Can anyone help me understand why I can call that
> function in certain files in my theme directory but not others?
>
>
>
> Thanks,
> Damian Taggart, President
> Mindshare Studios, Inc.
>
>
>
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list