Skip Navigation

[Resolved] Display parametric search and pager on many positions on the same page

This thread is resolved. Here is a description of the problem and solution.

Problem:

I created a view with taxonomy search filters, order buttons, search box and pager with AJAX.

I tested it and it seems it works fine.

But I had to display taxonomy search filters on the sidebar on the same page, just like different search widgets.

I did it by Layouts and I placed various instances of the same view on two different cells. One of them is set to "The search form and the results" and another is set to "Only the search form". I hid filters by CSS on each position where I don't want to display them.

It seems it works fine, AJAX update results and filters correctly.

Then I added the pager. I'd like to display it on top and on the bottom of the page, so I duplicated [wpv-filter-meta-html] and I hid search filters at the bottom of the page by CSS.

The pager works fine by itself, but if I select any order filter the pager disappears.

There is also an issue with the search box, it is just not searching...

Is there a way to fix this?

Solution:

1) The view you mentioned above "Series", it is a normal post view
/wp-admin/admin.php?page=views-editor&view_id=1298
but you are using it in a wordpress archive page:
/series/
It is a archive page of post type "series"

So the AJAX pagination and AJAX filters of normal view does not work as expected in the archive page.

In you case, I suggest use Views wordpress archive to customize the archive page, for example, you can edit the layout "Series"
/wp-admin/admin.php?page=dd_layouts_edit&layout_id=1269&action=edit
Edit the cell WordPress Archive cell "WordPress Archive", add orderby radio buttons and pagination in it, and test again.

Relevant Documentation:

WordPress Archive – Customizing the Appearance of Archive Pages

https://toolset.com/documentation/user-guides/normal-vs-archive-views/

Custom Pagination for WordPress Archives

https://toolset.com/documentation/user-guides/custom-pagination-for-wordpress-archives/

This support ticket is created 6 years, 10 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.

Our next available supporter will start replying to tickets in about 0.66 hours from now. Thank you for your understanding.

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

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 6 replies, has 2 voices.

Last updated by umbertoZ 6 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#610667
Captura.PNG

I created a view with taxonomy search filters, order buttons, search box and pager with AJAX.

I tested it and it seems it works fine.

But I had to display taxonomy search filters on the sidebar on the same page, just like different search widgets.

I did it by Layouts and I placed various instances of the same view on two different cells. One of them is set to "The search form and the results" and another is set to "Only the search form". I hid filters by CSS on each position where I don't want to display them.

It seems it works fine, AJAX update results and filters correctly.

Then I added the pager. I'd like to display it on top and on the bottom of the page, so I duplicated [wpv-filter-meta-html] and I hid search filters at the bottom of the page by CSS.

The pager works fine by itself, but if I select any order filter the pager disappears.

There is also an issue with the search box, it is just not searching...

I attach 2 images, you can see the pager before and after I use an order filter.

Is there a way to fix this? Is it ok to hide filters by CSS or there is a better way to do it?

thanks

#610935

Hello,

Thanks for the details, I can login your website, please point out the problem page URL and view URL, where and how can I see the problem you mentioned above:
but if I select any order filter the pager disappears

Thanks

#610971

Hi Luo, this is the page:

/series/

This is the View:
/wp-admin/admin.php?page=views-editor&view_id=1298

This is the Layout
/wp-admin/admin.php?page=dd_layouts_edit&layout_id=1269&action=edit

thanks a lot

#610982

I can see the problem, it is abnormal, in case it is a compatibility problem, please check these:
1) deactivate other plugins and switch to wordpress default theme, and test again
2) If the problem still persists, please provide a database dump file (ZIP file) of your website in below private detail box, I need to test and debug it in my localhost, thanks

#611025
#611264

Thanks for details, I can download the file, will feedback if there is anything found

#611265

Here are what I found:
1) The view you mentioned above "Series", it is a normal post view
/wp-admin/admin.php?page=views-editor&view_id=1298
but you are using it in a wordpress archive page:
/series/
It is a archive page of post type "series"

So the AJAX pagination and AJAX filters of normal view does not work as expected in the archive page.

In you case, I suggest use Views wordpress archive to customize the archive page, for example, you can edit the layout "Series"
/wp-admin/admin.php?page=dd_layouts_edit&layout_id=1269&action=edit
Edit the cell WordPress Archive cell "WordPress Archive", add orderby radio buttons and pagination in it, and test again.

More help:
WordPress Archive – Customizing the Appearance of Archive Pages
https://toolset.com/documentation/user-guides/normal-vs-archive-views/
Custom Pagination for WordPress Archives
https://toolset.com/documentation/user-guides/custom-pagination-for-wordpress-archives/

#611341

Hi Luo, my choice was to use a normal post view because I need to separate filters from result. I don't see this opcion on archive views.

To make a test, I disabled the archive for /series/ custom post type (I unchecked the has_archive option) and I created a page /series/ whare I assigned the layout Series (I removed the archive cell).

Here, I've the same issue.

Then I added the view to the homepage, without the sidebar, only the view with filters and result. Here everything works fine.

It seems the problem is with the splitted filters on the sidebar.

I finally found a solution. I setup the sidebar structure inside the view "Filter and Loop Output Integration Editor", like this:

<div class="row ">
<div class="col-sm-8 series-archive">
[wpv-filter-meta-html]
[wpv-layout-meta-html]
</div>
<div class="col-sm-4 series-archive-sidebar">
[wpv-filter-meta-html]
</div>
</div>

I also did it on the archive page layout and now everything works fine.

I think there is a bug with order filters when you split the view and add filters in more then one position of the page by layouts.

thanks