• Hi,

    I have a page that I created inside my wp-content/themes/mytheme
    Inside I put this:
    <?php get_header(); ?>
    My Code
    <?php get_footer(); ?>
    But I get the error that it doesn’t find the function get_header();

    Searching in internet I found that I have to put:

    require('./wp-blog-header.php');

    But if I put this require It loads more than I want. I mean more code, I just want the styles, the sidebar, etc

    Any ideas?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Is this a custom page template file? If so, have you reviewed custom page template?

    Thread Starter jspcat

    (@jspcat)

    Yes I did.

    In fact you can see the same structure that I said

    <?php get_header(); ?>
    My Code
    <?php get_footer(); ?>

    The problem is what I have to add before because if not I get the error

    “Fatal error: Call to undefined function get_header() in

    Can we see the code for that page template? If it’s more than about 10 – 15 lines long, please use the pastebin.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘get header in wordpress’ is closed to new replies.