I have created a custom post type named “People”. I have created a page template to display posts from the post type and is splitted in two categories named “Ambassador” & “Student”. The problem is that I have ajax posts enabled on this page. When you click on any of the thumbs below it changes the post in both the categories block.
Here is the link to the Page: http://rjmultimedia.in/relais/?page_id=37
Below is the jQuery code for ajax navigation
// Ajaxed navigation people slider
jQuery(document).ready(function(){
jQuery('.peoplecarousel a').live('click', function(e) {
e.preventDefault();
var link = jQuery(this).attr('href');
jQuery('.people_full').fadeOut(500).load(link + ' .people_full', function() {
jQuery('.people_full').fadeIn(500);
jQuery('.nano').nanoScroller({
preventPageScrolling: true
});
jQuery(".people_full_desc_content").nanoScroller();
});
});
});
Please let me know how i can rectify the issue as i am unable to create two different single.php files also for the custom post type.
As Mentioned Above I have two categories for custom post type. What I need is if someone click on the thumbnail of student only the “Student” full post should change and not the “Ambassador” post. It think this should be attained with different single.php for different taxonomies(Custom post type categories) but don’t know how to do this as wordpress dont have any such custom made function.
Thanks & Regards
Change
To
This will search for the .people_full element only inside the parent .peoplecarousel of the link clicked.