[wp-hackers] Scope for functions in a theme

Mindshare Studios info at mindsharestudios.com
Sat Nov 10 17:51:11 GMT 2007


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.






More information about the wp-hackers mailing list