Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

Wordpress Theme editing issue

New Here ,
Apr 16, 2017 Apr 16, 2017

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.

1.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 17, 2017 Apr 17, 2017

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:

» How to fix the “PHP Fatal error: Call to undefined function get_header()” error in WordPress | Ardamis

Kind Regards,
Maurice

Translate
Mentor ,
Apr 17, 2017 Apr 17, 2017

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 17, 2017 Apr 17, 2017

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:

» How to fix the “PHP Fatal error: Call to undefined function get_header()” error in WordPress | Ardam...

Kind Regards,
Maurice

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 17, 2017 Apr 17, 2017

thank you Maurice and Nancy!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 17, 2017 Apr 17, 2017

See if this helps.

Topic: Fatal error undefined function get_header() in index.php on line 1 « WordPress.org Forums

Nancy

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 06, 2021 Jan 06, 2021
LATEST

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.]

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines