Home page AJAX powered Genesis Loop

Community Forums Forums Design Tips and Tricks Home page AJAX powered Genesis Loop

This topic is: not resolved

Tagged: , ,

This topic contains 1 reply, has 1 voice, and was last updated by  jezza101 10 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #75587

    jezza101
    Participant
    Post count: 16

    I would like to have an AJAX powered front page on my site that allows users to select a category (or custom taxonomy) and then see the posts (or in my case custom teasers from my own replacement loop) update without a page reload.

    There is a useful more general WordPress tutorial here.

    Google seems to highlight some examples of people discussing this in Genesis and it seems all rather doable to me, however no one has posted up a good “how to” as far as I can see.

    Does anyone know if anyone has covered this before using Genesis? Blog post, or here in the forum?

    If not, I will do my best to work it out and will gladly share the results.

    My main concern is the overall architecture. I already have a custom Genesis loop which I have implemented via a plugin (as I use different child themes a plugin makes management easier). So I guess I need my Ajax script to replace the content area of my homepage with a re-load of my loop filtered for the category. Trying to figure out a nice way to do it all via a plugin.

    I have also tried this plugin which didn’t seem to work for me, I’m guessing a Genesis compatibility issue? But to be honest I kinda wanna build something myself for the experience / challenge of it. But it is pretty much what I want to do!


    My Genesis Powered site: http://www.nxtab.co.uk

    #76135

    jezza101
    Participant
    Post count: 16

    I figured it out.

    If anyone else is interested, my solution was to create a custom loop based on the posts here – lots of help in the comments.

    My loop was a function in my own plugin’s class. I used jQuery AJAX to post back to a “handler.php” script, this interpreted the $_POST variable and passed these parameters to my custom loop function in the class (which I made global). The loop outputs a set of posts that replaces the current set on the page.

    All working very smoothly, thanks all. I’ll post up a more detailed explanation here at some point in the (distant) future.


    My Genesis Powered site: http://www.nxtab.co.uk

    • This reply was modified 10 months, 3 weeks ago by  jezza101.
    • This reply was modified 10 months, 3 weeks ago by  jezza101.
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.