Last active
September 16, 2017 00:16
-
-
Save pablocattaneo/a8629cfb54ea8d00a450 to your computer and use it in GitHub Desktop.
Returns de current post id outside the loop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Returns de current post id outside the loop. | |
global $post; echo $post->ID; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment