Support » Plugins and Hacks » Writing a Plugin: adding information to <head>

  • is there anyway to add html to just the page or post that uses the plugin rather that adding html to the whole site through the <? wp_head ?> action?

Viewing 1 replies (of 1 total)
  • You can call wp_head() after you have decided whether the plugin needs to act on that page or post. eg:

    if(is_single()){
      add_action('wp_head', 'plugin_wp_head');
    }
    plugin_wp_head(){
      echo 'bla bla bla';
    }

Viewing 1 replies (of 1 total)
  • The topic ‘Writing a Plugin: adding information to <head>’ is closed to new replies.