• My custom use of the main loop failed. The <?php if (have_posts()) : ?> fails to find any records. In troubleshooting we experience a unusual behavior. The index.php under wordpress_blog works perfectly. However, if I make a copy of the index.php (say indexloop.php) in the same folder. It also will not return any records – only the template heading.

    How can the exact copy of the index.php file in the same folder not return the same information? It cannot be a path issue.

    Any insight would be helpful. Basicly, I embed the loop in my home page and link to the blog.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • It cannot be a path issue.

    It’s not. It’s a template anatomy issue. Template files are not called directly but are selected according to the template hierarchy.

    Thread Starter SSpearjr

    (@sspearjr)

    What???

    (1) My custom loop does not contain any template.
    (2) Why would a copy of the index.php file not execute exactly the same and find the blog records?

    Thread Starter SSpearjr

    (@sspearjr)

    I am bringing this issue back to the top. Why would a copy of the index.php not execute properly?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Index.php copy behavior’ is closed to new replies.