Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#42927 closed enhancement (duplicate)

Introduce the wp_body() function that fires the `wp_body` action

Reported by: ramiy's profile ramiy Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Themes Keywords:
Focuses: Cc:


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.



    <?php wp_head(); ?>


    <?php wp_body(); ?>


    <?php wp_footer(); ?>


It's a good improvement for WordPress 5.0.

Attachments (1)

42927.patch (574 bytes) - added by ramiy 7 years ago.

Download all attachments as: .zip

Change History (4)

7 years ago

#1 @birgire
7 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

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.

#2 @dd32
7 years ago

  • Milestone Awaiting Review deleted

#3 @ramiy
5 years ago

Fixed in changeset 45042

Note: See TracTickets for help on using tickets.