NX WP Theme

Footer


Hooks in WordPress allow us to modify or extend WordPress/Theme functionality without altering core files of the theme. We have also included some action hooks in the footer of this theme.

Action hooks

Instead of overriding the footer.php file, which is located in the root directory of the parent theme if not needed we can use the predefined hooks from nx-theme

  • nx_after_main
  • nx_body_close

How to use

In order to use the predefined action hooks we need to use add_action function with our own, to call as viewed below. Keep in mind that we can name our function as we please so replace custom_body_close_message with whatever you like.

function custom_body_close_message() {
    echo '

Custom message in footer.

'; } add_action('nx_body_close', 'custom_body_close_message');