[Resuelto] Find MULTIPLE posts by their IDs in one input field?
This support ticket is created hace 10 meses. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.
Sun
Mon
Tue
Wed
Thu
Fri
Sat
-
10:00 – 13:00
10:00 – 13:00
10:00 – 13:00
10:00 – 13:00
10:00 – 13:00
-
-
14:00 – 18:00
14:00 – 18:00
14:00 – 18:00
14:00 – 18:00
14:00 – 18:00
-
Supporter timezone: Asia/Kolkata (GMT+05:30)
Este tema contiene 13 respuestas, tiene 2 mensajes.
Only problem is: We don´t want to reload the page each time we wanna filter by IDs.
Our goal is inside a more complex search, to let the user search for HIS/HER posts (IDs saved in a custom user field), besides other search parameters.
So we have to use a URL-parameter, right? This now seems to only work for a SINGLE value.
For input field you must have submit button added to your view to filter the view as without submit button there is no way to filter the view results based on provided input box value.
Have you added the Query Filter for Post ID as given under:
Post ID filter
Include only posts with IDs set by the View shortcode attribute "ids" eg. [wpv-view name="view-name" ids="1"]
shortcode won´t work with AJAX, right?
We want the user to be able to check if he only wants to see HIS/HER posts and then search results should be updated by AJAX accordingly.
shortcode won´t work with AJAX, right?
==>
Yes - that's correct.
We want the user to be able to check if he only wants to see HIS/HER posts and then search results should be updated by AJAX accordingly.
==>
There is no other way as there is no such feature available even to filter posts by post ID but if you would like you can use the shared workaround. If not - there is nothing much we can do, I'm afraid.
So there is no way to let users search for their favorite posts in an AJAX search?
Or do you have an idea how you would do it?
Does it take /much) PHP?
Or maybe, just copy the post ID to a custom field at post creation and then search for that field?
So there is no way to let users search for their favorite posts in an AJAX search?
Or do you have an idea how you would do it?
Does it take /much) PHP?
===>
Maybe you can store the favorite posts post IDs while creation of posts and add a checkbox filter and if its checked then you can show favorite posts otherwise not. This is just idea I'm not sure if thats exactly your requirement but you can check and test.
Or maybe, just copy the post ID to a custom field at post creation and then search for that field?
===>
Yes - you can try that but you have to decide do you want to have multiple instance field that holds the post ID or comma separated post ID in one singular text field..
Or maybe save the USER-IDs, whose favorite a post is, in a post´s custom field like " 1 127 453 76 ..." and then text search for " USER-ID "? Then one would have to display a little form in each post with USER-IDs and manipulate that by JQUERY. Would that take very much resources?
Or maybe save the USER-IDs, whose favorite a post is, in a post´s custom field like " 1 127 453 76 ..." and then text search for " USER-ID "? Then one would have to display a little form in each post with USER-IDs and manipulate that by JQUERY. Would that take very much resources?
===>
I cant say much as I already acknowledged that there is no native feature available to add a custom search with post ID. Rather than what you shared what I shared would be more efficient and easy for you as per my perspective.