WordPress.org

Ready to get started?Download WordPress

Forums

Dont add function with wp_head if is_home (2 posts)

  1. andreapinti
    Member
    Posted 4 years ago #

    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 :)

  2. ogonkov
    Member
    Posted 4 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic