ThemeShaper Forums » Thematic


in_the_loop() not resetted after the loop - possible bug?

(3 posts)
  • Started 7 years ago by durroon2
  • Latest reply from durroon2
  • This topic is resolved
  1. durroon2

    Hi thematic developers,

    while writing a plugin which changes the title of a certain page using the 'the_title' filter hook, I observed a weird behaviour. I used in_the_loop() to check if I am inside the loop, thus being able to only change the title above the actual page content (not the menus, etc).

    Actually, the title was changed in the pages-widget of the primary aside sidebar, which is definitely not in the loop ;)

    I wrote a simple footer hook to check the state of the in_the_loop flag. It is still set to true in the footer. I only observed this behavior using thematic. For twentyeleven, etc., everything seems to be fine. I am using the latest version of thematic,

    Here is the footer hook I used to check the flag:

    function bug_footer_in_the_loop() {
    echo '<div>Still in the loop? '.in_the_loop().'</div>';
    add_action('wp_footer', 'bug_footer_in_the_loop');

    Posted 7 years ago #
  2. The best place to report that is on the google code site:


    Posted 7 years ago #
  3. durroon2

    ok, thanks. did not know this page!

    Posted 7 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.