Skip Navigation

[Resolved] Adding post count above search form

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

Tagged: 

This topic contains 7 replies, has 2 voices.

Last updated by Shane 4 years, 7 months ago.

Assisted by: Shane.

Author
Posts
#1825895

Hi, I am using Elementor page builder and have added a view in one column and the search form for this view in another column.

I would like to add the post count for the view above the search form but when I add it into that section nothing shows on the front end.

It does work when I add it above the view, however this is not where I want to place it. How can I add it above the search?

Thanks!

#1826353

Shane
Supporter

Languages: English (English )

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

Hi Mary,

Thank you for getting in touch.

The search results code must be placed within the view itself, however if you want it above the search form you can just place it above all the filters within the view.

Thanks,
Shane

#1826511

Thanks, I think the problem is I have to columns, one with just the view and one with just the search. So it is not possible to show it above the search if the view is in a separate column?

#1827267

Shane
Supporter

Languages: English (English )

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

Hi Mary,

As long as the view results are on the same page it should work fine but the shortcode for the count must be within the view itself.

Thanks,
Shane

#1827913
Screenshot-2020-10-28-at-23.23.17.png

Thanks, I've attached an image of my layout - the two columns both use the same view and are on the same page, however nothing shows when I try to move the post count above the search form (outlined in red).

#1828615

Shane
Supporter

Languages: English (English )

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

Hi Mary,

I did a quick double check on this one for you to confirm my advice. If the view is separated from the results then it won't work. It needs to be added

This means that if you add the search form separate from the results then you won't get the counter. There might be a workaround that you can use, are you building the view by going to Toolset -> Views or is this view built with blocks ?

Please let me know.
Thanks,
Shane

#1831995

Hi Shane,

Thanks for your help. I built this view in the block editor. Could potentially change it if necessary to get the layout I would like though.

#1832395

Shane
Supporter

Languages: English (English )

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

Hi Mary,

You can change it but it will only work if you add the counter to the results section. So you can just add the count above the starting of the results if thats ok, however it must be within the view.

Let me know if this was clear.

Thanks,
Shane