WordPress.org

Support

Support » Plugins and Hacks » Dont add function with wp_head if is_home

Dont add function with wp_head if is_home

  • Hey Guys,
    i run a website with a lot of plugins (6-8) so in the header of my website there is a lot of mess.

    I have at least 2 plugin (audio player and fbconnect) that works even if we are on the home page, but i really dont need them in that page. I was lurking inside the code and i find out that they use something like that

    function AudioPlayer() {
    (...)
    add_action("wp_head", array(&$this, "addHeaderCode"))
    (...)}

    or

    function fbc_init() {
    if (fbc_is_configured()) {
    (...)
    add_action('wp_footer', 'fbc_footer');
    (...)}

    Is it possible to insert something like “if (is_home())” somewhere in the code? Thanks and sorry for my poor english 🙂

Viewing 1 replies (of 1 total)
  • You can insert this to index.php (and any other page where you need it), and don’t use it at home.php, I suggest.

Viewing 1 replies (of 1 total)
  • The topic ‘Dont add function with wp_head if is_home’ is closed to new replies.