Visual resource map of the WordPress template hierarchy

The WordPress template hierarchy is the basis for the creation of WordPress themes and in Codex there is a good amount of resources available to know how to create themes and modify them, but not always navigate between pages is the best option, right?

Perhaps for this reason Rami Abraham was bundled and created a visual resource map in which you can see all the templates and dependencies between them, with the plus that each of the elements links to its corresponding page in the WordPress Codex thus creating a wonderful resource for developers and WordPress lovers in general.

map of the hierarchy of templates hosted on GitHub, of course admits making bifurcations (or forks as you prefer) so I've encouraged myself and created the version in Spanish to generate l enjoyment of all.

If you dare, you can collaborate on the official page of WPhierarchy or in the Spanish branch of HierarchyWP .

Adding Breadcrumb to your template • WordPress Help

Do not know what a breadcrumb is it would be something like the crumbs left Pulgarcito so as not to get lost when going into unknown lands. This, applied to a blog would be any type of navigation guide that guides the reader so that he knows at all times where he is .

In some templates that already have this integrated function you will see that it is a line that tells you the navigation route that is traveled to get to the post in question where you are, for example: "Start -> File -> March -> My post"

To get to integrate breadcrumb in your template will be put to use, again of the WordPress Conditional Tags useful for almost everything. We will use them to know if the visitor is in an article, in a page of categories or file.

For this we have to use the appropriate functions that show us the hierarchy of the blog. Do not worry it's nothing complicated, and WordPress has all the necessary functions to link to the main page, articles and post pages.

The following example would be a function breadcrumb cleans that you only have to copy it in the file functions.php of your template (and if you do not have this file you create it):

(Note: I advise you to always put it before the call to the post, that is to say , before …

And that's it, that's it, you just created ] a mod or simple for your readers to browse the sections of your blog.

Ah, I forgot. You can improve this code for example, by limiting the categories that will be shown, or just by showing a category. You just have to practice with the conditional tags . And yes, despite how simple it is, and what it gives you as a learning, you prefer to use a more automatic method, you can always install the Breadcrumb NavXT plugin, which creates the function for you and then only you have to add the code in the template.

NOTICE : this publication is from two years ago or more. If it's a code or a plugin it might not work in the latest versions of WordPress, and if it's a news story it might be obsolete. Then do not say we have not warned you.

Loading …

That may also help you: