Copy link to clipboard
Copied
I am having a problem editing wordpress themes in dreamweaver. it is giving me the following error:
Fatal error: Call to undefined function get_header() in C:\xampp\htdocs\wordpress\wp-content\themes\twentyfifteen\index.php on line 17
instead of showing the information on the index page of the theme. Not the top level index page shows the correct information (ie what is in my local version of wordpress).
This is on a local install of wordpress. I saw suggestions of disabling permalinks. but I can't find disable as a choice.
dohertydan,
viewing the index.php of the theme will always throw this error, no matter what you try. That's how it works.
To see any changes that you have made to your theme, you'll need to visit your website's main site.
This blog entry from another site might help:
Kind Regards,
Maurice
Copy link to clipboard
Copied
OK, so if you run wordpress on your local machine, can you do it by simply entering localhost in a browser? If not, then what is the url you use to run it locally?
When EXACTLY do you get the fatal error? When you are running the site from DW?
The get_header() function is a basic part of the wordpress structure. you can comment it out by putting two forward slashes in front of the function call, but eventually you will need it to run in order to view your edited theme correctly.
Copy link to clipboard
Copied
dohertydan,
viewing the index.php of the theme will always throw this error, no matter what you try. That's how it works.
To see any changes that you have made to your theme, you'll need to visit your website's main site.
This blog entry from another site might help:
Kind Regards,
Maurice
Copy link to clipboard
Copied
thank you Maurice and Nancy!
Copy link to clipboard
Copied
See if this helps.
Topic: Fatal error undefined function get_header() in index.php on line 1 « WordPress.org Forums
Nancy
Copy link to clipboard
Copied
I am also facing the same issue [URL removed by moderator].
[Moderator Note: Potential spam backlink removed.
Please start a new conversation if you are having difficulty, rather than piggybacking on this answered post from 2017.
Be sure to include pertinent information like your OS and DW versions and what, specifically, you are having issue with. This post is locked.]