Support » Fixing WordPress » is_home for second language home page

  • I have 2 instances of wordpress installed on a single domain name, one for 1 language version, a second in a subfolder for the english version, like

    On the home page of each version I want to display some specific text in the footer which should not display in internal posts or pages.

    On the 1st language version the is_home tag works well.

    However, for some reason, on the english version the is_home is not recognizing to be the homepage, hence the text does not display.

    How can I solve this to set the english site’s homepage as the ‘home’ page?

Viewing 4 replies - 1 through 4 (of 4 total)
  • you might want to try is_front_page()

    also, what is listed for your WordPress address (URL) and Site address (URL) on wp-admin/options-general.php?

    thanks for your reply.
    is_front_page(): does not work either

    If I look at the General tab under settings the wp address (home) is:
    and the blog url is set to the same url.

    I looked at the code in the options-general.php file. Here is the part of the code that I believe is relevant, but I cannot interprete it correctly:

    <?php if ( !is_multisite() ) { ?>
    <tr valign="top">
    <th scope="row"><label for="siteurl"><?php _e('WordPress address (URL)') ?></label></th>
    <td><input name="siteurl" type="text" id="siteurl" value="<?php form_option('siteurl'); ?>"<?php disabled( defined( 'WP_SITEURL' ) ); ?> class="regular-text code<?php if ( defined( 'WP_SITEURL' ) ) echo ' disabled' ?>" /></td>
    <tr valign="top">
    <th scope="row"><label for="home"><?php _e('Site address (URL)') ?></label></th>
    <td><input name="home" type="text" id="home" value="<?php form_option('home'); ?>"<?php disabled( defined( 'WP_HOME' ) ); ?> class="regular-text code<?php if ( defined( 'WP_HOME' ) ) echo ' disabled' ?>" />
    <span class="description"><?php _e('Enter the address here if you want your site homepage <a href="">to be different from the directory</a> you installed WordPress.'); ?></span>

    the code I mention had been put in the footer.php file, and it works on the wp instance I installed at the root (french language version).

    on the english version (the one where is_home does not work), any change I make to the footer.php file is not taken into account, whether with the is_home tag or any simple text editing = is not updated on the site. It seems like an old version of the footer is displayed all the time.

    Any idea?


    I found a way around this:
    any changes made to the the footer.php file appearing through the wp dashboard (appearance-editor) was NOT accounted for.

    I manually copied, changed the footer.php file via ftp and uploaded the modified version. It works fine now.

    Any idea why the wp-admin access to the file does not update the “real” file?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘is_home for second language home page’ is closed to new replies.