Last active
August 4, 2020 22:13
-
-
Save TheBinitGhimire/8dac2b929e44343766414f601513f0bb to your computer and use it in GitHub Desktop.
Get Comment Author Country from IP Address in WordPress
This file contains 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 | |
/* Place the following line of code in the file in your theme where you are willing to display the comment author's country! */ | |
echo esc_html(get_comment_author_country($comment->comment_author_IP)); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment