0
How do I determine the layout style of children posts in a specific category? It is possible to do this?
0
How do I determine the layout style of children posts in a specific category? It is possible to do this?
2
Yes, just follow the Hierarchy of Templates. In your case, what you need is one of these two files in your theme:
/wp-content/themes/seu-tema/category-$slug.php
/wp-content/themes/seu-tema/category-$id.php
For example, if the category is "shoes", create the following file in your Theme: /seu-tema/category-sapatos.php
.
Check out the slug
of its categories in http://example.com/wp-admin/edit-tags.php?taxonomy=category
, and the ID by clicking on one of the categories in the administration and checking the tag_ID
in the URL.
In this visual guide you can see how the hierarchy works, the priority is left to right. First look for the file category-$slug.php
, if there is no search for category-$id.php
, if it does not exist, use category.php
, etc..
Browser other questions tagged php html5 wordpress
You are not signed in. Login or sign up in order to post.
I realized you’re talking about "layout style"... you’re talking about CSS?
– brasofilo