Skip Navigation

[Resolved] View questions..

This support ticket is created 6 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Author
Posts
#1087700
problem 6.png
problem 5.png
problem 4.png
problem 3.png
problem 2.png
orginal results page.png
orginal frontpage.png

Hi

I run into some problems and I hope you can help me solve them

---
Problem 1: on the front page of the website I have put the search on location view, but in this function are also the other search terms that later want to apply to the results page. I would like to have the other search terms on this page, as well as the '' use my location '' and the reset button gone of this page..

LINK: hidden link

---
problem 2: if I type the location at the view like Rhoon, the Netherlands on the homepage. Then this brings me to the template of the view on the page results. In this template, my header header has become much broader in the length. then anywhere else on the website. how is this possible?

LINK:hidden link

---
problem 3: I would like to have the 'use my location' button and search for the button next to the filling in and the reset underneath

LINK:hidden link

----
problem 4: I would like to be the quantity of the terms behind my search terms

LINK:hidden link

----
problem 5: in the search terms I would like to see them as a dropdown with checkboxes how can this be done?

LINK:hidden link

problem 6: I would like to have a read more button after a few lines of text so the reader then can read the story..

hidden link

#1088342

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screen Shot 2018-08-21 at 11.22.41.png

Hi there

We have a policy of one issue per thread in the forums—it makes it easier for people searching the forums to locate similar issues—so I'll answer a couple of related issues now and then I may split some of the other questions off into their own topics.

Note that you seem to have a maintenance mode active so I cannot visit any of your links.

Problems 1 and 3 are related.

When you insert filters into your View, you do so in the search and pagination editor. Its content is just HTML markup, including the shortcodes to generate the form controls, which are themselves just markup.

Here is a simple example where I inserted a distance filter and a filter for a custom select field "choices", plus submit and reset buttons:

[wpv-filter-start hide="false"]
[wpv-filter-controls]

[wpv-control-distance default_distance="50" compare_field="street-address" distance_center_url_param="toolset_maps_distance_center" distance_radius_url_param="toolset_maps_distance_radius" distance_unit_url_param="toolset_maps_distance_unit"]

<div class="form-group">
	<label>[wpml-string context="wpv-views"]Choices[/wpml-string]</label>
	[wpv-control-postmeta field="wpcf-choices" url_param="wpv-wpcf-choices"]
</div>

[wpv-filter-submit type="button" output="bootstrap"]
[wpv-filter-reset type="button" output="bootstrap"]

[/wpv-filter-controls]
[wpv-filter-end]

You can edit this and, for example, add a div (which is a block-level element that begins a new line) around the submit/reset buttons so that they appear together on the same line (problem 3), e.g.

<div class="some-optional-class">
[wpv-filter-submit type="button" output="bootstrap"]
[wpv-filter-reset type="button" output="bootstrap"]
</div>

If you want to hide some elements on the homepage the easiest way is with CSS.

On the home page the body has the class "home" added, so you if I wanted to hide the Choices field control I could add a class "hide-on-home" to its wrapper div, like so:

<div class="form-group hide-on-home">
	<label>[wpml-string context="wpv-views"]Choices[/wpml-string]</label>
	[wpv-control-postmeta field="wpcf-choices" url_param="wpv-wpcf-choices"]
</div>

then add a little custom CSS, such as:

body.home .hide-on-home {
  display: none;
}

The problem arises that the wpv-control-distance shortcode generates all of the markup for the distance-related filter controls, so you can't add such a class to just parts of it.

You can see this in the screenshot (my test site is just using twentyseventeen).

Unfortunately the text cannot be targeted with CSS because they are text nodes inside the div rather than span elements, so you will also need a little JavaScript to help out here.

You can wrap all of the distance filter control inside a wrapper div with the same hide-on-home class, but you will need to use JS to pull the location input outside of that div so that it remains visible.

So, edit your distance control like so, adding an empty div where we will move the location input to as well as adding the hide-on-home class to hide the other distance UI:

<div class="distance-replace"></div>

<div class="hide-on-home distance-wrapper">
[wpv-control-distance default_distance="50" compare_field="street-address" distance_center_url_param="toolset_maps_distance_center" distance_radius_url_param="toolset_maps_distance_radius" distance_unit_url_param="toolset_maps_distance_unit"]
</div>

Then add the following custom JS:

( function( $ ) {
	$( document ).ready( function(){

      $('.distance-replace').append( $('#toolset-maps-distance-center') );
	});
})( jQuery );

Try that, and then I can move onto the other questions.

#1093199

Hi nigel,

Thank you for your support on this ticket!
I've put my website online so you can see the other issue's

Thank you...

Problem 1: SOLVED

---
problem 2: if I type the location at the view like Rhoon, the Netherlands on the homepage. Then this brings me to the template of the view on the page results. In this template, my header header has become much broader in the length. then anywhere else on the website. how is this possible?

LINK:hidden link

---
problem 3: SOLVED

----
problem 4: I would like to be the quantity of the terms behind my search terms

LINK:hidden link

----
problem 5: in the search terms I would like to see them as a dropdown with checkboxes how can this be done?

LINK:hidden link

problem 6: I would like to have a read more button after a few lines of text so the reader then can read the story..

hidden link

#1093743

Hi,

This is to notify you that Nigel is off today. he will continue working on your ticket once he gets back tomorrow.

Thanks.

#1095040

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Ramon

I split off the other questions into their own threads and answered them, so I think we can probably close this one?