title: How to run script for specific page from child-theme?
body: <p>I'm working on a project that I have a child-theme on which I'm running specific functions from the <code>function.php</code> file.</p>
  <p>My problem is that when I try to add an if condition to only run the script on a specific page, it doesn't work.</p>
  <p>I'm using the <strong>functions.php</strong> from the child theme.</p>
  <p>In other words... I need to be able to get the current page on the child theme.</p>
  <p>What am I doing wrong?</p>
  <pre><code>add_action(
      'init', function() {
          if (is_page('contact')) {
              wp_register_script( 'my-func', get_stylesheet_directory_uri() . 'my-func.js', '', '', false );
              wp_enqueue_script( 'my-func' );
          }
      }
  );
  </code></pre>
  <p>Thanks</p>