#42927 closed enhancement (duplicate)
Introduce the wp_body() function that fires the `wp_body` action
Reported by: | ramiy | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Themes | Keywords: | |
Focuses: | Cc: |
Description
When we want to add scripts & styles on the frontend, we can hook either to the wp_head
action or to the wp_footer
action.
The wp_head() function introduced in WordPress 1.2.0, it fires the wp_head action hook that adds data to the <head>
tag.
The wp_footer() function introduced in WordPress 1.5.1, it fires the wp_footer action hook that adds data to the end of the <body>
tag.
Currently we can't add data to the beginning of the <body>
tag. WordPress should have a way to allow developers to add data to the beginning of the body.
<html> <head> .. .. <?php wp_head(); ?> </head> <body> <?php wp_body(); ?> .. .. <?php wp_footer(); ?> </body> </html>
It's a good improvement for WordPress 5.0.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
Many think this is useful.
I found another ticket #12563 already discussing this, so I mark this as a duplicate.
Hopefully you can join that ticket instead.