• Resolved mrmccarrin

    (@mrmccarrin)


    Hi,

    My website is https://lawyerdev.meganrmccarrin.com/practice-areas/

    and I am trying to create a custom header for my Front Page template. I have created a php doc and named it custom-header.php,however, when I go to add any code to that php doc, I get the following error,

    Warning: Cannot modify header information – headers already sent by (output started at /homepages/43/d459884280/htdocs/wordpress-4.0/wordpress/wp-content/themes/shape/inc/custom-header.php:13) in /homepages/43/d459884280/htdocs/wordpress-4.0/wordpress/wp-includes/pluggable.php on line 1173

    I cannot understand how to fix this? Can someone please help?

    Thank you!

Viewing 10 replies - 16 through 25 (of 25 total)
  • Can you post the contents of your front page template to Pastebin, then?

    Thread Starter mrmccarrin

    (@mrmccarrin)

    I’m a bit confused. The code you posted to Pastebin doesn’t appear to call custom-header.php. Do you get the error when you visit your custom front page?

    Thread Starter mrmccarrin

    (@mrmccarrin)

    I do not have it set up to call the custom header because whenever I enter the hesder code into my custom-header php, it changes the entire look of the backend of my site.

    I initially called the custom-header on my custom front page, but it was coming up with the same error that I am getting now.

    How did you call the custom header? Did you use get_header( 'custom' );? Does your theme have a file named header.php?

    Thread Starter mrmccarrin

    (@mrmccarrin)

    No, I now realize I was doing it wrong. get_custom_header( );? I was now thinking.

    However, I now cannot get into my site at all. I can not log in to wp-admin after putting that code into my custom header. I was just going to start over, but after re-uploaded everything in filezilla, I still cannot get in. Any suggestions?

    Thread Starter mrmccarrin

    (@mrmccarrin)

    Please disregard my last comment. I was finally able to get in.

    Thread Starter mrmccarrin

    (@mrmccarrin)

    Thank you for your help. I am now longer getting an error, however, I am still having difficulty calling the custom header. The name of the file is custom-header.php and I have tried calling it with several names

    get_header(‘custom-header’); ?>
    get_header(‘custom’); ?>
    get_header(‘header’); ?>
    get_header(‘custom_header’); ?>
    get_header(‘customheader’); ?>

    But, none of these have worked. What is wrong?

    Here is what is have on my front page template currently:

    https://pastebin.com/wvhaBvip

    I’d forgotten how that function worked. When you call get_header('custom'), WordPress looks for a file named header-custom.php.

    Thread Starter mrmccarrin

    (@mrmccarrin)

    Got it! Thank you!

Viewing 10 replies - 16 through 25 (of 25 total)
  • The topic ‘Customer Header’ is closed to new replies.