0

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?

1

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' );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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