• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Home page AJAX powered Genesis Loop

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

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

This topic is: not resolved

Tagged: Ajax, jquery, loop

  • This topic has 1 reply, 1 voice, and was last updated 9 years, 3 months ago by jezza101.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • November 25, 2013 at 4:48 pm #75587
    jezza101
    Member

    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!

    November 29, 2013 at 5:42 am #76135
    jezza101
    Member

    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.

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble