Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress The WordPress Template Hierarchy Miscellaneous Templates in WordPress Media Templates

Daniel Schroeder
Daniel Schroeder
13,859 Points

More Specific MIME Types Seem to Override Less Specific Ones, Contrary to the Video...

I posted a JPEG image to my Home page, and when I clicked on the image, the more specific jpeg.php template ran, NOT the general MIME type image.php template. Why is this so? Is the video incorrect, or has something changed in WordPress since its release? Am I missing something?

1 Answer

Kyle Shamblin
Kyle Shamblin
9,945 Points

Yes sir, it looks like the hierarchy has changed. If anyone wants to see, here's the link used in the tutorial: https://wphierarchy.com/

Kyle Shamblin
Kyle Shamblin
9,945 Points

Just wanted to add that after experimenting, the video seems correct. (The picture was under image.php)