• Resolved JB Christy

    (@jbchristy)


    I’m creating a new theme based on the Timber starter theme. I’ve enabled this plugin on my local environment and on our staging site (neither is public), and configured it to display last modified info on both pages and posts. It works great on posts, but not at all on pages.

    I’ve stepped into the debugger and traced the problem to line 136 of frontend/page.php:

    
        if ( ! in_the_loop() ) {
            return $content;
        }
    

    Apparently in_the_loop() is returning FALSE when rendering a page, so the plugin returns the original $content instead of $content . $modified_content.

    Any thoughts on why this might be or what I can do about it?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Works on posts, not on pages’ is closed to new replies.