Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Identify Wordpress Page in Inspector
I'm utilizing Firefox to inspect pages within my Wordpress site to know where to customize CSS within a theme that I'm using.
Right now, I'm struggling to identify which PHP page is being used when inspecting. Is there a way to identify this?
If you you have body_class set in the
body tag you should see the template in use displayed as a class, e.g. page-template-default.
Failing that, for testing, I tend to drop a little text in to home.php, page.php, etc. so that if it displays on the page I can identify which is being used.
Hope that helps.
Kevin Korte28,135 Points
To echo Rich, I just drop in little comment at the beginning of the file so when you inspect in the developer mode, that comment will be in the markup.
Guys this feedback is phenomenal. Thank you all so much for these informative responses.