get_header doesn’t work but include(TEMPLATEPATH.’/header.php’) does
-
Hi,
I am building a theme loosely following the structure of WordPress default theme. I completed index.php and started to split it up into different files.
I cut and pasted everything in the page up to the ‘content’ div into a new file, and saved this as ‘header.php’ in the same directory as index.php. I used the code<?php get_header(); ?>
to include it.
However, this broke some of the php code, such asget_category_rss_link
andget_permalink
, which worked before.
I tried changing get_header to<?php include(TEMPLATEPATH.'/header.php'); ?>
and it worked.
Have I made a mistake or does certain code break when using get_header? Also, do I need to use get_header for certain functions or will include() suffice?
- The topic ‘get_header doesn’t work but include(TEMPLATEPATH.’/header.php’) does’ is closed to new replies.