L
L
Legal Adviser2020-08-20 16:43:36
WordPress
Legal Adviser, 2020-08-20 16:43:36

What do body class="page-template eat with?

I can’t understand why, with the same codes of template pages, in one case:

<body class="page-template page-template-page_information page-template-page_information-php page page-id-19 logged-in admin-bar wp-embed-responsive page_information group-blog customize-support">

Those. the resulting hierarchy is:
page-template
page-template-page_information
page-template-page_information-php
page
page-id-19
logged-in
admin-bar
wp-embed-responsive
page_information
group-blog
customize-support
In the second case:
<body class="page-template-default page page-id-8956 page-parent logged-in admin-bar wp-embed-responsive group-blog customize-support">

Those. the following hierarchy is obtained:
page-template-default
page
page-id-8956
page-parent
logged-in
admin-bar
wp-embed-responsive
group-blog
customize-support
Question:
Why are they different: page-template-default and page- template ?
where does page-template-page_information-php come from ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Druzhaev, 2020-08-20
@OtshelnikFm

Additional classes in the body can be set by third-party plugins or the theme chosen by the VI.
But there is no hierarchy here. those. Neither the order of succession nor anything affects the hierarchy. It is linear and one level here. You either cling to one or the other.
css cascading is not here either. classes in the same plane.
Your question is wrong

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question