• 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

Same Page With AJAX Search

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 › General Discussion › Same Page With AJAX Search

This topic is: not resolved

Tagged: Ajax, query, redirect, URL

  • This topic has 4 replies, 2 voices, and was last updated 7 years, 6 months ago by Porter.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • September 20, 2015 at 1:13 pm #166151
    Porter
    Participant

    I have something I'd like to accomplish, though I'm not sure if it's possible or not.

    I'll have a page, such as example.com/types
    From the /types page, you'll be able to AJAX search the different types, typeA, typeB, typeC, etc. This will result in different results displayed at the same URL of example.com/types

    Is it possible to have the primary navigation have links to the example.com/types pages, where the page loads with the AJAX query already searched? For instance, if I clicked on the primary navigation of TypeB, can I load example.com/types, with the AJAX area already displaying the results of TypeB? The idea is to load the same URL (example.com/types), while still automatically displaying the specific information of certain queries. I know you can query in the URL, but that's not what I'm trying to do.

    I'd love to learn anything I can about this, let me know!


    Buy me a beer? | Try DigitalOcean VPS Hosting

    September 20, 2015 at 2:58 pm #166166
    Victor Font
    Moderator

    This description sound a lot like category pages. If the typeA, typeB, etc are categories assigned to posts, you could in fact use category pages.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    September 20, 2015 at 3:25 pm #166168
    Porter
    Participant

    If you're referring to category archive pages, that's not what I'm looking for. I'm using custom post types, and advanced custom fields to sort a large variety of data (could very well be custom taxonomies, but it doesn't really matter). The idea is that there are infinite combinations of queries, such as:

    hotels + bars
    Hotels + restaurants + delivery food
    Hotels + bars + Take Out
    Restaurants + Chinese + Delivery

    The list goes on and on, and the additions to the queries have plenty of other examples. The idea is that there's a central example.com/venues page, which lists ALL venues. On this page, you can filter (using AJAX), and display only the venues you want to see (like the above queries), while staying on example.com/venues. My question is, is there a way to land on example.com/venues (no queries in the url, or final url you land on if you redirect), with an AJAX query already on the page - for example, the page already shows bars + take out. The idea is to keep the user on the example.com/venues page, while allowing the flexibility to search through venues (while being exposed to the other static content on this page, that doesn't change with the filtering). I want to have navigational links that lead to this page, with the AJAX area already displaying specific information.


    Buy me a beer? | Try DigitalOcean VPS Hosting

    September 20, 2015 at 5:51 pm #166171
    Victor Font
    Moderator

    If you don't want to use query strings in the URL, you are most likely looking at using jQuery.Ajax in a document onload function. I haven't done this myself, but this is where I would start: http://api.jquery.com/jquery.ajax/. Hope it helps.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    September 20, 2015 at 6:21 pm #166173
    Porter
    Participant

    That seems more in line what I'm looking for - I'll read up, thanks!


    Buy me a beer? | Try DigitalOcean VPS Hosting

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘General Discussion’ 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