• Resolved karlyy1999

    (@karlyy1999)


    Hello ??
    I hope this is the right forum to post this request.

    I’ve been struggling for a few days now on this matter.

    I’ve tried to do my own theme based on another theme. As of now, I’ve just changed the FOOTER and the HEADER in which I brought my own code taken from my website.

    Moreover, I’ve added all of my scripts and CSS files in my fonctions.php at the root of my theme. No PHP error are showing when I turn on wordpress’ debug mode. However, on every page, it brings out this error :
    – Template part has been deleted or is unavailable: header
    – Template part has been deleted or is unavailable: footer

    I’ve added all the possible tags on my files such as “<?php wp_footer(); ?>”, along others so allow wordpress to work properly. WordPress does have access to those files & is allowed to read and edit.

    Note : If I change the extention of my footer.php & header.php into .html, they work, but they don’t take any CSS or JS into consideration.

    any idea how to solve it ? I really am running out of ideas…
    Thanks !

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @karlyy1999!

    Please check that your footer.php and header.php have correct names (lower case, are at the root of your theme folder, and have correct contents:

    The first line of header.php should be <!DOCTYPE html> (indicating the beginning of an HTML document) and the last line of footer.php should be </html> (indicating the end of an HTML document). WordPress functions like get_header(), get_footer(), and wp_footer() should be used properly.

    Also, ensure you’re calling the header and footer correctly in your PHP files. This is typically done with the get_header(); and get_footer(); functions. If you are creating custom headers or footers, make sure you’re referencing them correctly with get_header('custom'); and get_footer('custom');, where ‘custom’ is the name of your custom header or footer.

    Thread Starter karlyy1999

    (@karlyy1999)

    Hey there @olgabulat !

    Thank you for your input, this solved my problem ?? – it was just a typo that I didn’t see with the long day of work… your message put me on the right way )

    have a good day !

    Awesome! Nice that you found the typo, @karlyy1999 Have a good day, too!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Template part has been deleted or is unavailable: header’ is closed to new replies.