Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm trying to implement some AJAX to my theme, but there are a few things I cannot get my head (or Google) around.

I have a custom post type named "Faculty" and a page displaying the featured image for each entry in the custom post type in a grid that links to /faculty/entry1, /faculty/entry2 etc.

Instead of loading a new page with the content I'm trying to load the content above the grid using the admin-ajax.php file.

But how can I implement this leveraging the current "pretty" permalinks?

What I would like to achieve is that the user clicks the featured image and the url will change to /faculty/item2 and I will receive the content for item2 via AJAX. And if the user manually enters /faculty/item2 in the browser the same faculty page will load with the content from item2.

I really hope the explanation makes sense - and that somebody can give me a pointer in the right direction.

EDIT: This is an example of the functionality I'm looking for, just with the WordPress permalinks implemented: http://themewich.com/aware/

share|improve this question

1 Answer 1

You can do that with html5 history API with which you can change the URL at the address bar whenever you want. Works on anything modern which is not IE, but maybe this utility will help with IE.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.