0

I'm using the technique found here: How to load Wordpress Post with Ajax onclick to load Ajax content into my wordpress div on this page: http://dev.riverroadcoffees.com/shop-online/

The code is:

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");
$("#shop").html('<div class="loading"><img src="http://dev.riverroadcoffees.com/blog/wp-content/uploads/2013/12/ajax-loader.gif" /> <span>Loading...</span></div>');
$("#shop").load(post_url);

return false;});
});

CODE IN TEMPLATE:
<article>
<a href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>" class="ajax"><?php the_post_thumbnail('bag', array('class' => 'alignleft')); ?></a>
<h4><a href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>" class="ajax"><?php the_title(); ?></a></h4>
<?php the_field('strength'); ?>
</article>

Everything works as expected...but I don't have a way for a user to bookmark a URL or reference a URL for a certain product. I'm hoping it's something simple. But I could be wrong.

Community
  • 1
  • 1
  • bookmark or reference a URL? what is that? sounds confusing !! – bajajsahil Feb 05 '14 at 15:28
  • Just need a way for the user to be able to send a link to a particular product that is loaded using Ajax. (ie..."Check out this awesome product. Here's a link: http://www.link.com") Right now there is nothing. They will always get directed to the main page with all the products. – Christi Yarema Feb 05 '14 at 19:00

0 Answers0