Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm working on a IP Locator Service, and I want to display a Customized Google Map which shows the visitor's location. It works fine here, but I don't know how to incorporate it into my Blog.

I've got the "html/javascript in Wordpress" Plugin, but I also need to apply a few Meta tags to the page. Is there any plugin/tweak that allows to add a meta tag only to one page?

Please Help!!

Edit: I also need to include javascript (< script>< /script>). How can I do that?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

You have two options. Both involve using a conditional tag. I don't know which conditional you'll need to test for, hence the "{something}" placeholder. (If I had to guess, you may use the is_page( $ID ) tag.)

Edit your theme header file.

It's usually called header.php:

if( is_{something}() ) {
    echo '<meta ......... />';
}

Use the wp_head hook in your functions.php file

function wpse_54694() {
    if( is_{something}() ) {
        echo '<meta ......... />';
    }
}
add_action( 'wp_head', 'wpse_54694' );
share|improve this answer
    
Thanks! I'll give it a try –  Nick Jun 9 '12 at 18:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.