In WordPress, how can I get the error log to see a postID of a page on the load
-
I have tried using
get_the_ID()
,global $post; error_log(print_r($post->ID,true))
,the_ID()
and I cannot the post_ID of a page on load in WP. I have added:add_action( 'load-post.php', 'myFunc' ); add_action( 'post.php', 'myFunc' ); add_action( 'load-post-new.php', 'myFunc' ); function myFunc(){...}
How can I do this?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘In WordPress, how can I get the error log to see a postID of a page on the load’ is closed to new replies.