2 added 64 characters in body
source | link

You can/should ask the main query directly (which is, in fact, exactly what the is_front_page function is doing).

<?php global $wp_query; ?>
<?php if ( $wp_query->is_front_page() ) : ?>
    <div><?php the_content(); ?></div>
<?php endif; ?>

If you even altered the main query, somehowhowever, refer to the backupbackup.

<?php global $wp_the_query; ?>
<?php if ( $wp_the_query->is_front_page() ) : ?>
    <div><?php the_content(); ?></div>
<?php endif; ?>

You can/should ask the main query directly.

<?php global $wp_query; ?>
<?php if ( $wp_query->is_front_page ) : ?>
    <div><?php the_content(); ?></div>
<?php endif; ?>

If you even altered the main query, somehow, refer to the backup.

<?php global $wp_the_query; ?>
<?php if ( $wp_the_query->is_front_page ) : ?>
    <div><?php the_content(); ?></div>
<?php endif; ?>

You can ask the main query directly (which is, in fact, exactly what the is_front_page function is doing).

<?php global $wp_query; ?>
<?php if ( $wp_query->is_front_page() ) : ?>
    <div><?php the_content(); ?></div>
<?php endif; ?>

If you altered the main query, however, refer to the backup.

<?php global $wp_the_query; ?>
<?php if ( $wp_the_query->is_front_page() ) : ?>
    <div><?php the_content(); ?></div>
<?php endif; ?>
1
source | link

You can/should ask the main query directly.

<?php global $wp_query; ?>
<?php if ( $wp_query->is_front_page ) : ?>
    <div><?php the_content(); ?></div>
<?php endif; ?>

If you even altered the main query, somehow, refer to the backup.

<?php global $wp_the_query; ?>
<?php if ( $wp_the_query->is_front_page ) : ?>
    <div><?php the_content(); ?></div>
<?php endif; ?>