• This morning I added google ads to my RSS links and this afternoon when I went to my login page Dosbeerigos.com/wp-admin the only thing that pulls up is a google ad?

    I did some searching and the wp-blog-header.php is pulling up on a preview of the ad.

    The code inside the file is reading;

    <?php
    /**
    * Loads the WordPress environment and template.
    *
    * @package WordPress
    */

    if ( !isset($wp_did_header) ) {

    $wp_did_header = true;

    require_once( dirname(__FILE__) . ‘/wp-load.php’ );

    wp();

    require_once( ABSPATH . WPINC . ‘/template-loader.php’ );

    }

    ?>

    I am not sure why this is happening, is there anyway to fix this without losing all my information on my website? I can’t even get into the dashboard to attempt to delete google adsense.

    Thank you in advance!

Viewing 14 replies - 1 through 14 (of 14 total)
  • Is this a plugin you inserted, or did you put this in a file outside your theme’s header.php template?

    Thread Starter dosbeerigos

    (@dosbeerigos)

    It was not a plugin, I attempted to place an ad in my footer this morning, but deleted it immediately after since it didnt show up on the site

    Most people I know put the google ads into their post or page template where it shows up right above each post and page entry.

    I would go into the template and remove the code. Should fix the problem. That is very strange that it showed up in your login page.

    You really only need to alter the pages in your wp-content/themes/yourtheme
    and no other place.

    Thread Starter dosbeerigos

    (@dosbeerigos)

    “I would go into the template and remove the code. Should fix the problem. That is very strange that it showed up in your login page.”

    which template? I only have access to my ftp server is the issue in wp-content/themes/yourtheme ?

    If there is a way to access that file… then that is where you need to go and remove the code producing the Google ad code where you do not want it to go.

    There should be no reason why that code should show in your wp-admin page at all unless you put it there.

    So, you have to remove that code and put it in another place.

    Thread Starter dosbeerigos

    (@dosbeerigos)

    Thats the thing I cant find the file with the google ad code in it….is the code in my wp-blog-header.php file correct

    Thread Starter dosbeerigos

    (@dosbeerigos)

    or is there a way to reinstall the theme to clear out wherever the code went without losing all of my content?

    or a way to backup the site content and doing a fresh install?

    if you have that file in your theme’s folder, then yes.

    Otherwise, go through each file carefully just in case to check.

    So… you do not have access to anything outside your theme’s folder in FTP or on your webhosting account?

    Thread Starter dosbeerigos

    (@dosbeerigos)

    no I have access to everything through my ftp client (filezilla) just no access to dashboard for wordpress

    You may have to look at whatever files you edited before. It just seems you edited a file you may have accidentally added the google ad code to and meant to put it elsewhere. I cannot tell because I have no access to that to be able to tell you exactly what is going on.

    Thread Starter dosbeerigos

    (@dosbeerigos)

    I just went through the php files in the main folder, nothing

    and the files under wp-admin nothing

    any idea where I should look or a way to search the script on the site to see the root folder for the file?

    You might have to check all of your files. I am not sure where else to tell you to look. I would offer to solve this issue, but I have no time to do free site work.

    It has to be somewhere. I would probably recommend replacing most of your files except your wp-content folder and your wp-config.php to fix the issue….and see if the problem was that a file outside your theme was edited.

    Thread Starter dosbeerigos

    (@dosbeerigos)

    Thank you for your help blondishnet

    I found the file

    Is there a way that I can ad the google ads automatically at the end of each of my posts?

    You can ad it in your single.php file of your theme

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘wp-blog-header.php is a google ad’ is closed to new replies.