Skip Navigation

[Resolved] search and result control

This support ticket is created 4 years, 2 months ago. 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 13 replies, has 2 voices.

Last updated by kayser 4 years, 2 months ago.

Assisted by: Shane.

Author
Posts
#1473039

Hi
hidden link

How to keep the search result list if you haven't changed the search and consult only the results

Guy

#1473275

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Guy,

Thank you for getting in touch.

Could you clarify your question for me ? I'm not exactly sure of what you are asking.

Thanks,
Shane

#1473303

Hi Shane
hidden link
When I do this search and select an item from the list, the taxonomy becomes empty and all the companies are displayed.

is it possible to keep the search results until we do a new search?
to be able to consult each of the results

#1473389

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Guy,

Given that the sidebar view is being filtered based on the current page that you are viewing then it is not possible.

If the page changes then the results on the side will change as well. Its not possible to keep the results of the previous page on the current page.

Thanks,
Shane

#1473529

Hi Shane
is there any other way to do this ?
guy

#1475003

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Guy,

I did some thinking on this and no it isn't possible to achieve.

I was thinking that we could pass the current page ID as a parameter when you click on the sidebar, this would indeed cause the sidebar to retain the previous post listings but when you navigate to post 2 then list 1 will show. When you're on Post 3 the original list that was to be shown on Post 2 will be shown on Post 3.

The main issue now is that when you're on Post 1 there won't be a list because there won't be an ID passed into the URL for the view to be filtered.

Please let me know what you think of this as this is the best approach.

Thanks,
Shane

#1476209

Hi Shane
it seems to me an idea to try, can you help me with the code
guy

#1476883

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Guy,

The main issue is that the first view won't display anything.

You will end up having to use 2 identical views, one that filters based on a url parameter and the other filter based on the current page.

Essentially we will need to hide the first view after it has been displayed .

Please provide me with admin access to the site so that I can help you with this.
Thanks,
Shane

#1476945

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Guy,

I had a look at this and it seems it won't be possible as.

I had initially thought that this view was being filtered by the current post but it isn't it is actually a search view. So we won't be able to keep the previous search results when you navigate to another page.

Thanks,
Shane

#1476967

Hi Shane
thanks for trying, I thought it was possible to block the search on this page until we had made a new one.
But the fields are empty when we choose another result.
and if you don't see anything else, I close this request
Guy

#1476999

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Guy,

I just had an idea, could you confirm that you want the previous page's search result to remain until a new search is performed?

We can actually use the current URL values and append it to the URL of the posts in the list as parameters.

Whenever a URL in the sidebar is clicked it will pass the Parameters of the Current page to the page that you clicked to, this will in turn filter the sidebar to the list that was on the previous page.

We can keep doing this until a new search is performed.

Please let me know.
Thanks,
Shane

#1477001

yes it seems to me a good idea.

#1477165

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Guy,

Have a look here now.
hidden link

As you can see if you click on one of the links in the sidebar, it will take you to the new page but retain the filtered items from the previous page.

Unless the user filters the view again then the results will remain the same.

This was achieved by formatting the content in the view like this.


<ul class="wpv-loop js-wpv-loop">
		<wpv-loop>
			<li>
           
				<h4><a href="[wpv-post-url]?wpv-discipline=[wpv-search-term param='wpv-discipline']&wpv-public=[wpv-search-term param='wpv-public']">[wpv-post-title]</a></h4>
			</li>
		</wpv-loop>
	</ul>

Please let me know if this helps.
Thanks,
Shane

#1477823

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.