WordPress.org

Ready to get started?Download WordPress

Forums

Show which PHP files page uses (7 posts)

  1. tshirtfiend
    Member
    Posted 4 years ago #

    Is there an easy way to see which PHP files a page uses? I'm trying to troubleshoot an issue, and there's some stray code, but I'm not sure which template it's getting pulled from. I think it may be from one of the plug-ins that I'm using, but it's a little tough to tell, since all I'm looking at is source code.

    I've already marked my template files with comments at the beginning/end, but that's not enough. It's still somewhere else. Any suggestions?

  2. magickman5
    Member
    Posted 4 years ago #

    can you tell what is your issue? basically you have header.php, footer.php, page.php, index.php, archive.php, comment.php, sidebar.php.,
    index.php is a combination of header,footer,sidebar...

  3. tshirtfiend
    Member
    Posted 4 years ago #

    Yeah, I have an extra <div> in there, and I'm not sure where it's coming into the mix. It's just a clearer div.

    Somehow, it's getting inserted between the last post and the sidebar.

  4. brettalton
    Member
    Posted 4 years ago #

    I'd like to know this too.

    I have my Posts page pointing to a static page, but no matter what PHP file I edit (including posts.php), the static content that I'm editing doesn't change.

  5. Samuel B
    moderator
    Posted 4 years ago #

    theme's single.php show single post views
    theme's page.php shows page views
    theme's index.php usually controls home page

  6. alchymyth
    The Sweeper & Moderator
    Posted 4 years ago #

    if you have the time and patience, you could add the file name as html comment at the beginning of every php file of your theme - and then look at the html code in your browser of with firebug.

  7. tshirtfiend
    Member
    Posted 4 years ago #

    The problem for me is that I'm using a plugin (Shopp) that has it's own pages and templates. Some of these are part of the plug-in core, others are editable. So it's not clear to figure out what's loading.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags