Skip Navigation

[Resuelto] group search results by post type

This support ticket is created hace 5 años, 9 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Este tema contiene 3 respuestas, tiene 2 mensajes.

Última actualización por Ido Angel hace 5 años, 8 meses.

Asistido por: Christian Cox.

Autor
Mensajes
#1211595

hey,

I have recipes and guides. When someone searches for a keyword, I want to split the results according to each post type - for example, show:

RECIPES (10 hits)
GUIDES (4 hits)

and if possible - clicking on each "filter" would filter only the clicked post type.

Is this possible somehow?

Thanks!

Ido

#1211597

I have an idea, but maybe it's only a workaround:

1) create 2 separate views, one for each post type
2) create a page with tabs/toggles in it
3) place each view in a different tab
4) put the tab headers in

  • tags in each view
    5) put the

      tag outside the views, in the page

      should work. but is there a more native way?

      cheers,
      ido

  • #1212612

    Hi, I'm not sure what you mean by this:
    "and if possible - clicking on each "filter" would filter only the clicked post type."
    Could you show me a rough mockup of what this means?

    In general, you can update the results of two Views using one set of filters if you disable AJAX on both Views, but I'm not sure what you mean by the clicked post type so I'm not 100% sure what else you want to accomplish. Let me know and I'll take a closer look.

    #1212614

    Hey,
    Basically I meant for it to act like tabs. something like here:
    enlace oculto
    (and it's indeed tabs)
    I think I'm fine with my suggestion - I tried it and it works.
    Thanks C!
    Ido