Show my custom post id if a country or ip
I believe you can do something like this (not tested): if($_SERVER[‘REMOTE_ADDR’]==”89.0.0.0″ && $post->ID==15){ $post5 = get_post(‘5′); echo $post5->post_title; //Call custom meta using $post5->ID; } Update: If you’d like to replace the original object you can do the following: if($_SERVER[‘REMOTE_ADDR’]==”89.0.0.0″ && $post->ID==15){ global $post; $post = get_post(‘5’); setup_postdata($post); //Here you can call for the_content() or the_title … Read more