title: How to call WordPress plugin function from custom page template?
body: <p>I have a custom WordPress plugin that handles authentication.</p>
  
  <p>There's a function logTheUserIn() inside plugin-name/src/Classes/Auth.php.</p>
  
  <p>I need this function to be run when a user hits a custom WordPress template page (page-authPortal.php), which has this code at the top:</p>
  
  <pre><code>    include_once('wp-includes/pluggable.php');
      include_once("wp-content/plugins/ad-auth-bridge/src/Classes/Auth.php");
      print "test";
  </code></pre>
  
  <p>I created a WordPress page titled "authPortal" and it shows the 'test' text, so I know the custom page is being loaded and rendered. Now I just need to fire off logTheUserIn().</p>
  
  <p>I have tried adding shortcodes and actions inside Auth.php:</p>
  
  <pre><code>class Auth {
      public function InitHooks() {
  
    add_shortcode ('authNow', 'logTheUserIn');
    add_action ('authAction', 'logTheUserIn');
  </code></pre>
  
  <p>I've then tried to use the actual shortcode [authNow] inside the WordPress editor, I have also tried do_shortcode and do_action.</p>
  
  <p>What am I missing here?</p>
  
  <p>Thank you!</p>