Skip Navigation

[Resolved] Create two views with same content

This support ticket is created 4 years, 1 month 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)

Tagged: 

This topic contains 9 replies, has 2 voices.

Last updated by avansisI-2 4 years, 1 month ago.

Assisted by: Shane.

Author
Posts
#1867697

I need a view that only shows the results when you hit the search button. And another that shows the results, I do not care if it is on the same page or another, but I am doing something wrong. Can you help me?

#1867915

Shane
Supporter

Languages: English (English )

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

Hi Avansis,

Thank you for getting in touch.

Are you creating your view using the Block or classic editor ?

Either way what you need to do is not to use the view block when adding your view. Add a classic editor block to your template then use the Fields and Views button to add your view.

When you select your view you will be presented to add the Search form only, Both Search and Results and finally only the Results.

What you need to do is select the Search form only and then it will prompt you for the page that the results is on. From there you can go ahead and create your results page and populate it with the Results only form the view.

Please let me know if this helps.
Thanks,
Shane

#1868249
Captura de pantalla 2020-12-07 a las 20.26.55.png

Thanks Shane,

I create this, with a field and views, but not i need that only when clic in search show results. How can i get this?

#1868261

Shane
Supporter

Languages: English (English )

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

Hi Avansis,

It seems from your screenshot you've added the results on the same page as the search form.

The idea is to add the results on a completely separate page and use the instructions that I provided in my previous post to guide you through this.

If you're not sure on this you can provide me with the login details and I separate the items for you.

Thanks,
Shane

#1868285

Shane
Supporter

Languages: English (English )

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

Hi Avansis,

Thank you for the credentials, however i'm unable to access the login page.

Can you check on this and let me know when it works.

Thanks,
Shane

#1868287

check again please

/wp-admin/

#1868331

Shane
Supporter

Languages: English (English )

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

Hi Avansis,

You should be able to resolve this by using this conditional below and wrapping it around the <wpv-loop> tags.

[wpv-conditional if="( '[wpv-search-term param='wpv_filter_submit']' ne '' )"]

<table width="100%">
		<thead>
			<tr>
				<th>[wpv-heading name="types-field-nombre_campana"]Nombre de la campaña[/wpv-heading]</th>
				<th>[wpv-heading name="types-field-referencia-del-bono"]Referencia del bono[/wpv-heading]</th>
				<th>[wpv-heading name="types-field-fecha-de-creacion-del-bono"]Fecha de creación del bono[/wpv-heading]</th>
				<th>[wpv-heading name="post-taxonomy"]Estados[/wpv-heading]</th>
				<th>[wpv-heading name="types-field-comprobante"]Comprobante[/wpv-heading]</th>
				<th>[wpv-heading name="post-taxonomy"]Comercios[/wpv-heading]</th>
			</tr>
		</thead>
		<tbody class="wpv-loop js-wpv-loop">
		<wpv-loop>
			<tr>
				[wpv-post-body view_template="loop-item-in-validador-bonos-comercio"]
			</tr>
		</wpv-loop>
		</tbody>
	</table>
[/wpv-conditional]

Please let me know if this helps.
Thanks,
Shane

#1868349

Where i have to add this?

#1868365

Shane
Supporter

Languages: English (English )

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

Hi Avansis,

In your search view. Just replace the similar section in the view with the one that i've provided.

Thanks,
Shane

#1868383

My issue is resolved now. Thank you!