Custom Files & Headers, Footers and Sidebar (2 posts)

  1. Subfusion
    Posted 10 years ago #

    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?

  2. moshu
    Posted 10 years ago #

    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:

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.