I'm working in a page of Wordpress that reload the post showed in one DIV. The reload comes from the click in any post of the list under this DIV.
All is working fine but the problem is that i want to mantain friendly url's of Wordpress, and AJAX needs to send data in an url.
In frontend:
<div id="<?php the_ID(); ?>" onClick="inlove_ajax(this.id); return false">
In AJAX file:
xmlhttp.open("GET","wp-content/themes/37504/ajax_photo_reload.php?q="+str,true);
In PHP (ajax_photo_reload.php):
require_once("../../../wp-blog-header.php");
$q=$_GET["q"];
query_posts('p='.$q);
while (have_posts()) : the_post();
I was thinking and trying different solutions:
- Add an exception in .htacces for these file
- Some way to send data with friendly urls