WP functions (get_header, etc.) not working
-
I’ve been trying to build my own theme for my blog, Crooked Glasses, and the theme I’ve got cobbled together right now works as long as I don’t put any WP functions in (like get_header, wp_list_pages, etc.). As soon as I put something like the following code in my page, I get a “Fatal error: Call to undefined function” error:
<?php wp_list_pages() ?>
<?php get_header() ?>
I’ve had to call the header with a relative filepath instead, which apparently means that the header only works on the main page (index.php). As soon as you click off onto FAQ, About Me, Links, or even Previous Entries, it turns the page into an ugly text-only display.
I kinda have a grasp on how to build the theme, but it certainly is a setback to not have any of the dynamic content like wp_list_pages and wp_most_recent_posts (I think that’s right), and not to be able to have my layout visible past the first page. I have no idea what I’m doing wrong–I’ve tried to put in the code exactly as all these guides and tutorials have shown me.
Odd footnote to this: The Loop’s functions work wonderfully–stuff like “while (have_posts); the_post;”, “the_time”, “the_date”, etc. Any WP functions outside the Loop breaks the whole page. I am a relative newb to PHP, so most of my “troubleshooting” just leads to more confusion.
- The topic ‘WP functions (get_header, etc.) not working’ is closed to new replies.