Skip Navigation

[Resolved] Editing search view

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

Problem:

Style the custom search form buttons and pagination links.

Solution:

It needs some CSS codes, for example:
https://toolset.com/forums/topic/editing-search-view/#post-1310193

Relevant Documentation:

This support ticket is created 5 years, 5 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 – 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 10 replies, has 2 voices.

Last updated by kerimF 5 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#1309243
toolset.PNG

Hi there!

So for some reason I'm not able to put the submit and reset button underneath the filter bar. I tried <br> but it's not working. I could really use some advise :). I also want to put the navigation buttons underneath the search results. I really have no idea how to do this. Could you help me a bit along the way? Thanks a bunch :). A link to where the view is: hidden link.

Greetings,

Kerim

#1309345
#1309437
4-columns.JPG

Hello,

Thanks for the details, for the middle issue, I have setup a demo in your website:
1) Create a post view "newsearch 2", with 4 columns layout
hidden link
see screenshot: 4-columns.JPG

2) in section "Search and Pagination", wrap the buttons in a div tags:

<div class="row my-center-div">
[wpv-filter-submit output="bootstrap"] [wpv-filter-reset output="bootstrap"]
</div>

click "CSS editor", add below CSS codes:

.my-center-div{
 text-align: center;
}
.my-center-div input[name="wpv_filter_submit"]{
     margin-right: 20px !important;
}

2) In section "Loop Editor", line 20 ~ 22, same as above wrap the codes into a HTML div tag, insert the pagination shortcode as below:

<div class="row my-center-div">
	[wpv-pager-nav-links output="bootstrap" previous_next_links="true"]
</div>

See the result here:
hidden link

Is is only a demo for your reference.

Here is document about text-align:
hidden link

#1309499

I don't get it. I can't edit the layout in the current view. Also, I really want to use 3 columns, not 4. So i don't get why i have to turn it into 4. Also, with the last piece of code; you're using this:

<div class="row my-center-div">
[wpv-pager-nav-links output="bootstrap" previous_next_links="true"]
</div>

But with the view I'm using, I see:

<div class="pagination-container">
<ul class="pagination">
<li class="page-item">[wpv-pager-prev-page force="true"][wpml-string context="wpv-views"]«[/wpml-string][/wpv-pager-prev-page]
<li class="page-item">[wpv-pager-next-page force="true"][wpml-string context="wpv-views"]»[/wpml-string][/wpv-pager-next-page]
[wpv-pager-nav-links output="bootstrap" previous_next_links="true"]
</div>
[wpv-filter-end]

You can change the current, good layout as long as nothing is removed. Could you please apply the changes for me?

#1309513

You are using Bootstrap 3 with Elementor plugin, there might be some conflicts, for example:
Elementor plugin is using their own grid systems, which is different from Bootstrap framework:
hidden link

I have already setup a demo in your website without Elementor for your reference:
hidden link

If you need help to change your original post view "newsearch", please backup your website, then update this thread, I can setup the demo for you tomorrow morning, since I am off today, I am working on GMT +8 timezone.

#1310173

Goodmorning Liu,

I made a backup for my site. Do you have everything you need to set up the demo now?

#1310177

It is afternoon here, I am working on GMT + 8 timezone, and I am checking it in your website, will update here if there is anything found

#1310185

Awesome. So you're setting up the demo? I'm still putting my work on the website on on hold till this problem is solved.

#1310193
grid.JPG

There are some problems in your original post view "newsearch"
hidden link
for example:
You are querying the "Evenementen" posts, and filter by taxonomy "Trainers", but this taxonomy does not register to "Evenementen" post, see it here:
hidden link
section "Taxonomies to be used with "

so that taxonomy filter won't be able to work.

so I have cloned it to the new post view "newsearch 2", and done the modifications here:
hidden link

You can see it in front-end:
hidden link

Please check if it is what you want.

Some tips:
1) If you are going to setup Bootstrap grid with Views plugin, you can setup it within Views GUI, for example, in the new post view "newsearch 2":
hidden link
section "Search and Pagination", click button "Grid", see screenshot Grid.JPG

2) In above post view "newsearch 2", section "Search and Pagination", click "CSS editor", you should be able to see all custom CSS codes I have done:

.my-center-div{ /* submit and reset button div */
 text-align: center;
  margin: auto;
  margin-bottom: 10px;
}

.my-center-div input[name="wpv_filter_submit"]{ /* add margin-right to submit button */
     margin-right: 20px !important;
}

.my-center-ul { /* pagination link div*/
  margin: auto;
}

I have added the comments in above CSS codes, for your reference.

3) As I mentioned above, the taxonomy "Trainers" filter won't be able to work, you should be able to see this message:
This View has some query filters that are missing from the form. Maybe you have removed them:
Filter by categorie-trainer-evenement

And finally, you can put above view shortcode into your other pages:
[wpv-view name="newsearch-2"]

#1310507

Bro, thank you very much for your help. It's exactly what I wanted :). Just one more question. Let's say I would like to change the layout from to 4 columns, what do I need to change?

#1310787
Number-of-columns.JPG

You can switch to 4 columns by this:
Edit the view, in section "Loop Editor",click button "Loop Wizard", choose option "Bootstrap grid", you will see an option "Number of columns". see screenshot Number-of-columns.JPG

#1311121

My issue is resolved now. Thank you!