Forums › Forums › Search & Filter Pro › Separate Results – Results by Order and Results by Alphabetical
- This topic has 6 replies, 2 voices, and was last updated 5 years, 5 months ago by Trevor.
-
Anonymous(Private) July 3, 2019 at 9:28 pm #215553
Hello,
The results of my form are listed first by Order #, then Alphabetically.Is it possible to style the results to separate the listings?
For Example:
Results By Order
—<hr>—
Results Alphabeticallyor
<div class=”order”>
Results By Order
</div><div class=”alpha”>
Results Alphabetically
</div>If you can please point me in the right direction, it will be appreciated.
Thank you!
Trevor(Private) July 4, 2019 at 7:17 am #215563It would depend on the Display Result Method you are using. Most will use a theme or plugin PHP template file and that would need re-coding.
The simplest method is where the results are displayed
as a Shortcode
as the PHP in our results.php template file is very simple and uses a structure recommended by WordPress. Additional logic would have to be added to test (at the start and end of each while loop) to test if certain terms had change, and to start a new section and output header/start of section and end of section HTML. You would need to employ a third party coder to do this, as it is not within the scope of our support.Anonymous(Private) July 4, 2019 at 9:14 pm #215608Hello, Thank you for your reply.
I understand this is a custom coding issue and appreciate your assistance.Can the results.php or custom output contain more then one Query / while loop?
If I have a query for metakey1 and another, seperate query for metakey2, will the search and filter properly filter both loops?
Will Ajax work for both loops on a single page?
Thank you.
Trevor(Private) July 18, 2019 at 2:35 pm #216579It would be critical that all posts have one or other value stored.
In the while loop instead of directly outputting to the page the HTML for each result, you would have two variables storing the HTML for each results. You do a test at the start of each while loop and decide which of the two variables to append this result to. When the while loops exits, you then publish the two variables, with whatever enclosing HTML that you need.
-
AuthorPosts