title: Call an external function inside wordpress code
body: <p>Does wordpress ignore foreign php code? I'm attempting to throw a function call in an external class below this line on root index.php of wordpress</p>
  
  <pre><code>/** Loads the WordPress Environment and Template */
  require( dirname( __FILE__ ) . '/wp-blog-header.php' );
  </code></pre>
  
  <p>Here is my function call</p>
  
  <pre><code>require_once($_SERVER['DOCUMENT_ROOT']."/modules/Site-Traffic/Site-Traffic.php");
  //Create traffic object for tracking who is hitting this page
  $site_traffic = new Site_Traffic();
  $site_traffic-&gt;SetTrafficLog();
  </code></pre>
  
  <p>Here is what happens within this function.</p>
  
  <ul>
  <li>Sets the correct database, table, user name, password</li>
  <li>Checks the querystrings parameters for special cases to track in the function</li>
  <li>If the function sees a special parameter case it inserts it into a site-traffic table by creating a sql statement and then calling my
  mysqliconnection library</li>
  <li>The library then takes the sql statement, the database, table, username and password and inserts the site-traffic call into the
  corresponding table.</li>
  </ul>
  
  <p>I use this on all my pages outside of wordpress and it works fine and yet on the index.php page it does not work at all.</p>
  
  <p>I'm able to echo out the sql statement, database, table, username and password from the wordpress index.php page so I know it is getting to that point.</p>
  
  <p>EDITED: Made the issue more apparent and specific</p>