WordPress.org

Support

Support » Plugins and Hacks » WP Maintenance Mode » [Plugin: WP Maintenance Mode] Where to place hook script

[Plugin: WP Maintenance Mode] Where to place hook script

  • Where can I place the hook scripts such that they would not be overwritten by a plugin update? From your example:

    function add_my_link() {
        echo '<a href="http://mylink.com/">My Link</a>
    }
    add_action( 'wm_footer', 'add_my_link' )

    Usually I would place such a thing in my theme’s functions.php, but I wasn’t sure that this was the correct location for this particular case.

    Thanks!

    http://wordpress.org/extend/plugins/wp-maintenance-mode/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi usableweb,

    Your theme’s function.php is in fact the correct place to place hooks. 🙂

    Hi usableweb,

    Your theme’s function.php is in fact the correct place and safest place to apply. The concern with doing that, is that if a theme receives an update it’s files may be replaced. Although, in that case you would make a child theme.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WP Maintenance Mode] Where to place hook script’ is closed to new replies.
Skip to toolbar