Fala Peter.
As you yourself mentioned, the documentation image already gives a good help. I will make a possible path and you answer with questions if you have. So, basically just create the files in the folder that Wordpress makes the selection.
The image
General rule
Basically, Wordpress will follow from left to right, trying to find the appropriate template, according to the alternatives.
Let’s assume you have a tag created "books I read". So when you type in the address:
sitecombr/livrosqueli
- Wordpress will check whether what you are seeking is an author, category, custom post, taxonomy, date or tag. In our case it is a tag.
- Next step is to find out if you have a file in your theme root directory called "tag-librosqueli.php" or "tag-id_da_tag".
- If not, try to find the file "php tag.".
- If not found, Wordpress will try to use the file "Archive.php", if you have paging, you will use the "paged.php".
- If all fails, Wordpress uses the default "index php.".
Use of basic templates
Archive.php
Used to display post groups. Example: Last blog posts.
single php.
Used to display the content of a post. Example: When the visitor clicks on a post within a list of posts.
page php.
Used to display static pages. Example: Display institutional pages like "Who We Are", "About", "Contact"...
home php.
Used to display home posts. If you have set a static page as the home page, the template used will be the front-page.php.
comments-popup.php
Used to display comments from a post when opened via popup (I don’t think I’ve ever used this template, rs).
404.php
Used to display specific content when a post is not found.
search php.
Used to display the results of a site search.
Absss!
Wow, Leonel blazon? So I understood your explanation, it was more or less what I imagined. But my question is more in Archive.php for now, like this: Here at the company a friend has developed a website and at a certain place he used Archive.php, and when I asked, said that was pq the Archive.php is for a set of items, list. Anyway, it’s a mess in my head, when it’s best to use this or that, the pq and tals...
– Peter Roberto
Speak Peter. I edited the answer see if it helped you. : D
– Leonel Costa Braz
Thank you very much, Leonel. My last question is the following, let’s assume, that you have to have a page that talks about the customer, for example and it will contain items. In case I’ll do type Archive-biography.php, and in that file I’ll loop or whatever neh?! E ae, how will I make this Rchive to be called in the biography menu? Pq thought that in the menu, I could only call if it was the same page and such... Note: I don’t know if I can explain what I have in my head... Basically, how to make clear that in a certain place will have to appear the Archive-biography...
– Peter Roberto
I understood that the WP goes one way to reach a given file, or the index as the last one, if it doesn’t have what it would have to be. But the bid is only how to make such Archive.php appear at a certain place...
– Peter Roberto
This is @Peterroberto. First, what kind of information is "Biography"? Is it a post category? A tag? A custom post type? Identifying this, you go to the image diagram and search, for example: If it is a "category", you will use the template: "Category-biography.php". If it is a tag: "tag-biography.php". To appear in the menu: 1. Go to "Appearance > Menus". 2. Check all boxes in the retractable "Screen Options" menu (Top right corner). 3. Then you can select the items from the left menus and add to your menu.
– Leonel Costa Braz