Note that there are some explanatory texts on larger screens.

plurals
  1. POAJAX loading of outside HTML content works perfect on localhost but not on server
    text
    copied!<p>I am trying to render content generated by a php file in [jQuery Colorbox][1] through AJAX in my WordPress site. The PHP resides on the same server in the same domain. It works perfect when I run it on localhost but it's not working on the server.</p> <p>Here is the link to my site - <a href="http://shabdcreatives.com/portfolio" rel="nofollow">http://shabdcreatives.com/portfolio</a></p> <p>The links themselves are not invalid, for example the following link works fine on its own:</p> <p><a href="http://shabdcreatives.com/wp-content/plugins/catgrid/includes/CatGridPost.php?ID=33" rel="nofollow">http://shabdcreatives.com/wp-content/plugins/catgrid/includes/CatGridPost.php?ID=33</a></p> <p>I just won't open inside the colorbox.</p> <p>Also the php file I am trying to load is just a fragment and DOES NOT CONTAIN any <code>&lt;html&gt;</code> or <code>&lt;body&gt;</code> tags.</p> <p>I tried the colorbox support group but no replies from them yet</p> <p>This is the code in the CatGridPost.php file that i am calling in the colorbox.. i tried calling a plain text file too... it returned no error.. but the colorbox did not show its contents either</p> <pre><code>require_once("../../../../wp-blog-header.php"); $thepost = get_post($_GET["ID"]); $thecontent = $thepost-&gt;post_content; $thetitle = $thepost-&gt;post_title; $thelink = get_permalink($_GET["ID"]); ?&gt; &lt;div id="cg-post-container"&gt; &lt;div id="cg-post-title"&gt; &lt;a href="&lt;?php echo $thelink; ?&gt;"&gt;&lt;?php echo $thetitle; ?&gt;&lt;/a&gt; &lt;/div&gt; &lt;div id="cg-post-content"&gt; &lt;?php echo $thecontent; ?&gt; &lt;/div&gt; </code></pre> <p></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload