WordPress.org

Ready to get started?Download WordPress

Forums

Fatal error: Call to undefined function: get_header() in /home/bloggin7/public_ (7 posts)

  1. bloggin7
    Member
    Posted 6 years ago #

    I was doing a simple paste into index.php of google adsense and my index.php exploded into this error. No web page visible but I do have access to admin. I've tried deleting index.htm, a reinstall of my theme, and have had no success. Any help for a drowning "webmaster"? would be greatly appreciated! What is listed below is all that is displayed. My blog is http://bloggingforinternetcash.com.
    ...Dave Carlson
    Fatal error: Call to undefined function: get_header() in /home/bloggin7/public_html/index.php on line 1

  2. Teli
    Member
    Posted 6 years ago #

    Hi Dave,
    It looks as though you edited the wrong index.php file -- if you're trying to add AdSense to your theme, then you need to edit the theme's index.php file. I surely hope you made a back up of that original index.php file because you'll need to re-upload it to your blog's root folder.

    ~ Teli

  3. bloggin7
    Member
    Posted 6 years ago #

    Hi Teli ...
    Thanks but thats the file that adsense was going into, between
    <!--YOUR GOOGLE ADSENSE CODE GOES DIRECTLY BENEATH THIS LINE-->

    and

    <!--END GOOGLE ADSENSE CODE-->

    I'll keep plugging along (not exactly knowing what in the world I'm doing).

    If you get an inspiration please let me know. Thank you ... Dave

  4. bloggin7
    Member
    Posted 6 years ago #

    In my index.php file the version prior to the latest download the only thing in it was "Silence is golden". I really think someone is maliciously screwing my website up. I think I know where it is coming from but can't prove yet. If I'm wrong ... this isn't a some kind of April fools joke is it? Either way ... I am really not amused. Can someone out there please help me?
    Thank you ... Dave

  5. ClaytonJames
    Member
    Posted 6 years ago #

    In my index.php file the version prior to the latest download the only thing in it was "Silence is golden". I really think someone is maliciously screwing my website up. I think I know where it is coming from but can't prove yet. If I'm wrong ... this isn't a some kind of April fools joke is it? Either way ... I am really not amused.

    I think you may find that file to be present in the folder "wp-content" by default. It should be there. It is one way of keeping people from browsing
    your wp-content folder. As Teli suggests, perhaps the index.php file that is in your public_html folder was erroneously edited or replaced.

  6. bloggin7
    Member
    Posted 6 years ago #

    ClaytonJames...
    Thanks for the heads up and sorry it has taken so long to get back to you. I have been sick and not having my website up doesn't help. I'll keep checking I just might get lucky.
    ...Dave

  7. poolaka
    Member
    Posted 5 years ago #

    I recently had this exact same problem using Google Analytics. This forum actually helped point me in the right direction. Thanks for the inspiration!

    I re-uploaded the index.php that defaults to wp-content folder(silence is golden, etc.). That allowed me to get my clients blog back up and running.

Topic Closed

This topic has been closed to new replies.

About this Topic