[wp-hackers] Scope for functions in a theme

Mindshare Studios info at mindsharestudios.com
Sun Nov 11 00:25:20 GMT 2007


It's odd I did as you sigested but I'm still getting the same error? Any
other thoughts?

Thanks!
Damian

-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com
[mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Christine
Davis
Sent: Saturday, November 10, 2007 5:08 PM
To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] Scope for functions in a theme

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
>
_______________________________________________
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