Languages: English • Italiano • 日本語 (Add your language)
Whether the caller is in The Loop (i.e. whether the loop is currently active).
<?php in_the_loop(); ?>
none.
For use in your functions file, this code example enables you to modify the default output of your entry titles.
add_filter( 'the_title', 'modify_single_post_entry_titles' ); function modify_single_post_entry_titles( $title ) { if ( is_singular( 'post' ) && in_the_loop() ) { /* Modify $title */ } return $title; }
Since: 2.0.0
in_the_loop() is located in wp-includes/query.php
.