title: How to call a function after wordpress page/post load?
body: <p><strike>
  I'm trying invoke a function after wordpress page/post load. I added:</p>
  
  <pre><code>add_action('wp_loaded','MyFunc');
  </code></pre>
  
  <p>to functions.php but it's not working. How do I do that correctly?
  </strike></p>
  
  <p>Edit:
  So I'm going in a different way, I put </p>
  
  <pre><code>&lt;script&gt;
            MyFunc();
  &lt;/script&gt;
  &lt;input class="clickMe" type="button" value="call MyFunc" onclick="MyFunc();" /&gt;
  </code></pre>
  
  <p>at the end of comments.php
  The button works great and when I press it, the function is called.
  But I want the function to run without pressing the button. and that doesn't work.</p>