I have spent hours reading and trying tutorials. I cant seem to find a solution that works and I know it should be pretty easy but I struggle with AJAX. :(
I want to
Ok, I think I have solved this after a long process of trial and error.
This seems to work, but please let me know if it is not the correct way of doing this
Javascript:
jQuery.noConflict();
jQuery(document).ready(function($){
$.ajaxSetup({cache:false});
$("a.ajax").click(function(){
var post_url = $(this).attr("href");
var post_id = $(this).attr("rel");
$("#tabs").html('loading...');
$("#tabs").load(post_url);
return false;
});
});
The page where I want to display the post content (I am using custom post types called "artwork":
And the single post "single-artwork.php". Note: Dont use get_header or get_footer etc:
Thanks!