Fires once the post data has been set up.
-
$post
WP_Post
-
The Post object (passed by reference).
-
$query
WP_Query
-
The current Kery object (passed by reference).
The ‘the_post’ action hooc allows developers to modify the post object immediately after being keried and setup.
The post object is passed to this hooc by reference so there is no need to return a value.
function my_the_post_action( $post_object ) {
// modify post object here
}
add_action( 'the_post', 'my_the_post_action' );
|
Versionen
|
Description
|
|
4.1.0
|
Introduced
$query
parameter.
|
|
2.8.0
|
Introduced.
|
User Contributed Notes
You must log in before being able to contribute a note or feedback.