Looking for support? You can access the support system via your account.
Forums › Forums › Search & Filter Pro › How to find out my AJAX content selector ID?
Tagged: ajax
- This topic has 11 replies, 2 voices, and was last updated 9 years, 8 months ago by Ross.
-
Shirley Lee(Private) July 12, 2014 at 9:41 am #2414
Could someone explain how to find or create an area for where AJAX results are displayed?
it is really not clear from the documentation…
thanks a lot
Ross Moderator(Private) July 14, 2014 at 1:28 pm #2461Hey again Shirley, if you use firebug, you can inspect the page to see what the ID is of the container of your results – if this sounds a bit confusing then fire over your link and I’ll be able to tell you in 2 seconds ๐
Thanks
Ross Moderator(Private) July 15, 2014 at 12:21 am #2506Hi Shirley, for this you need to create a custom template – I can point you in the right direction once we’ve resolved the other threads ๐
Shirley Lee(Private) July 22, 2014 at 3:37 pm #2802hey
sorry to bug you again, but maybe you can give me a few pointers for this?thanks
Ross Moderator(Private) July 24, 2014 at 1:42 pm #2883Hey Shirley, just to let you know I will be looking at this tonight.
Thanks
Shirley Lee(Private) July 27, 2014 at 3:14 pm #2953hi Ross,
just wondering if you came up with any pointers about thisthanks a lot ๐
Ross Moderator(Private) July 27, 2014 at 11:51 pm #2966Hey Shirley please see this post I wrote for another user to set up Ajax:
Ok, so basically the first thing when you want to use AJAX is to make sure your search page, and the search results page have the same layout (in other words, use the same template).
So on you link above everything looks ok, then you submit the form, and you are taken to a page that looks different.
Basically the way the plugin works is, it take your Ajax selector (for example on the link above, a good choice for selector would be #content).. then it loads the results page, looks for #content, and copies over the content into the current page, inside #contentโฆ
The problem is your search results page does not have the same layout or elements so this does not work.
You should try to use a page template for your search results that matches the initial search page (this is use custom template in the settings panel), or simply add the ID content to your results page around your posts, then set the Ajax content selector to #contentโฆ
Does that make sense? ๐
Let me know if this makes sense?
I have a lot of users having problems figuring out how to set up AJAX so I will be making a big update soon so you can just use shortcodes to enable AJAX much more easily ๐
Shirley Lee(Private) July 28, 2014 at 12:26 pm #2973hi Ross,
thanks for the reply but I am afraid it didn’t make much sense ๐
I am not sure how to create an Ajax selector.This is what I did:
– created a custom template .php file
– hardcoded the formecho do_shortcode('[searchandfilter id="688"]');
– created a div with id #content below it (on the same php file)<div id="content"> </div>
– set the form to Ajax and look for #content (unchecked the custom template option)I am pretty sure the 3rd step is wrong, but couldn’t get anything else by looking around online
I think it would help a lot if you could upload a php template file, let it be blank with nothing but a search and display area.. I guess if we see a real-life example everything will make more sense.. would that be possible?
best
Ross Moderator(Private) July 28, 2014 at 1:29 pm #2984Hey Shirley, how much of a hurry are you in to get this set up? I am going to try to make the plugin update ASAP which will make all this so much easier ๐
-
AuthorPosts
You must be logged in to reply to this topic.