Support » Themes and Templates » Custom Files & Headers, Footers and Sidebar

  • I’m developing a new WP theme for my website and I’ve got some custom files which pull out information out of the WP database differently to the way WP does it on the homepage.

    On these pages I still want to use WP templates such as the header, footer and sidebar. But when I try to call them I get the following error:

    Fatal error: Unknown function: get_header() in /home/*****/public_html/*****/wp-content/themes/evibes/about.php on line 1

    Obviously I have to add an include on this file that calls the main WP files, is there a way round to this?

Viewing 1 replies (of 1 total)
  • If you want to use WP functions in a non-WP file (like “get_header”) you need to add this at the top of those files, before everything else:

Viewing 1 replies (of 1 total)
  • The topic ‘Custom Files & Headers, Footers and Sidebar’ is closed to new replies.