• I noticed that quite recently my google ads on the main page have gone missing yet are present on every other page. I think I may have figured it out, but do not know how to resolve.

    I recently changed Site Address (URL) to be different from the WordPress Address (URL). Although I did change the index.php file to include the line

    require(‘wordpress/wp-blog-header.php’);

    this does not seem to bring the ads in on the homepage. Every other page does include the ads – just not the homepage. Any idea what I am missing?

Viewing 3 replies - 1 through 3 (of 3 total)
  • wordpress/wp-blog-header.php

    Denotes that to check the directory “under” the current directory

    with the relative paths changing all the time from page to page including the home page it’s proper to actually use the whole pathing to the file in question in a require.

    WordPress defines this path in ABSPATH

    so

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

    Would be more appropriate to write it out at.

    Of course if your installation is in the wordpress directory then

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

    note: dunno if you need the /

    Thread Starter sinner831

    (@sinner831)

    Seems when I do that I just get a blank page.

    Here is how my index.php file looks now:

    <?php
    /**
     * Front to the WordPress application. This file doesn't do anything, but loads
     * wp-blog-header.php which does and tells WordPress to load the theme.
     *
     * @package WordPress
     */
    
    /**
     * Tells WordPress to load the WordPress theme and output it.
     *
     * @var bool
     */
    define('WP_USE_THEMES', true);
    
    /** Loads the WordPress Environment and Template */
    require('wordpress/wp-blog-header.php');
    ?>

    My install exists in a wordpress directory, as you mentioned, but when I use your suggested code I just a blank page.

    Thread Starter sinner831

    (@sinner831)

    Anyone have any idea?

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

The topic ‘Ads Missing From Home Page Only’ is closed to new replies.