Reputation: 1409
How do I find our which template a wordpress URL uses
E.g. I would like to change the template used by the following URL http://portabellointeriors.com/bed-size/super-king/
but am unsure which file to edit.
What is the easiet way to find out
Upvotes: 0
Views: 125
Reputation: 4503
Use the function body_class()
this will output a lot of info about the page as a class. More info:
http://codex.wordpress.org/Function_Reference/body_class
Edit: Just checked the website and saw that body_class()
was already being used, it is an archive page so if you edit archive.php
then you'll edit that page and all other archive pages.
Upvotes: 1
Reputation: 10190
Refer to the Template Hierarchy article in the WordPress Codex. If you read and digest that whole article you will be able to figure it out.
You can also log into the back-end and edit that specific page and see if a template is defined in the box on the right, but likely it is a custom post type archive template so that probably won't get you anywhere.
It depends a lot on how the site is set up, but you are probably looking for a template file starting with archive
or category
or taxonomy
as that is definitely an archive page of some kind. If you can provide further insight into how the content is organized (custom post types, custom taxonomies, tags, categories, and so forth) I can help further.
Upvotes: 0