WordPress.org

Ready to get started?Download WordPress

Forums

add_Action in wp_footer do not work - is it a bug? (7 posts)

  1. lahoti
    Member
    Posted 1 year ago #

    After updating to 3.4.1 one of my plugin stopped working. I thought it was an issue with the plugin - tried a few thing and finally - instead of add_Action('wp_footer','plugin_function') I used
    add_Action('wp_head','plugin_function').
    Before 3.4.1. it worked so I am just wondering what really happened? If it didnt work for wp_head I would have blamed the plugin but either it is WP or am I doing something funny..!!!

  2. vinay
    Member
    Posted 1 year ago #

    check the presence of <?php wp_footer(); ?> in your footer.php on your active theme file.

  3. lahoti
    Member
    Posted 1 year ago #

    Yes it is there. As i said it was working previously...

    STrange thing: i tried it with ('wp_footer','plugin_function',5) and it worked.

    DO not really understand what is happening here

  4. vinay
    Member
    Posted 1 year ago #

    the third parameter 5 is for priority. It mean there is another hook which prevent displaying the plugins particular function. Making it top priority(4), it will invoke that plugin before any other(if there priority is less than 5. By default if no priority is given, it will be 10)

  5. vinay
    Member
    Posted 1 year ago #

    Did you update wordpress only or other plugin files too?

  6. lahoti
    Member
    Posted 1 year ago #

    Yup.. i know its priority - but my question is even if there is no priority it should have been loaded... isnt it?
    The plugin is not updated since 3-4 months.
    There is one more plugin probably with same issue - but it already has prioirity so will try with wp_head and see what happens.

  7. eugenealegiojo
    Member
    Posted 1 year ago #

    I also have same issue and adding priority should fixed it.

Topic Closed

This topic has been closed to new replies.

About this Topic