Counter variable when using wpv-for-each
Started by: Cesar
in: Toolset Professional Support
Quick solution available
Problem: I would like to output an index value when looping over a repeating field instanced with wpv-for-each.
Solution: You'll need a custom shortcode to do this. Add the following custom shortcode definition in your child theme's functions.php file, or in a new snippet in Toolset > Settings > Custom Code.
add_shortcode('wpv-index', function () {
static $i = 0;
$n = $i++;
return $n;
});
That will create a shortcode wpv-index, which we can use in the wpv-for-each loop to create these carousel-indicators list items.
Next, use wpv-for-each to iterate over the fotografia field instances and generate the indicator list items:
[wpv-for-each field='wpcf-fotografia']
<li data-target="#carousel" data-slide-to="[wpv-index]"></li>
[/wpv-for-each]
2
3
4 years, 7 months ago
Cesar
We need help on several issues
Started by: matthiasV-2
in: Toolset Professional Support
2
8
4 years, 7 months ago
matthiasV-2
Custom post displays in general list but not in search results
Started by: tommasoO
in: Toolset Professional Support
2
4
4 years, 7 months ago
Minesh
I want to review the real estate tutorial, but it hangs at about 30 seconds.
Started by: John
in: Toolset Professional Support
2
4
4 years, 7 months ago
Luo Yang
Toolset grid shows empty box when using if condition
Started by: dzemalN
in: Toolset Professional Support
2
3
4 years, 7 months ago
dzemalN
Search results to show value 1 and 3 when 1 is selected in Toolset
Started by: pramodk-2
in: Toolset Professional Support
2
7
4 years, 7 months ago
pramodk-2
taxonomy terms data
Started by: fredericR-2
in: Toolset Professional Support
Quick solution available
2
4
4 years, 7 months ago
fredericR-2
Split: taxonomy archive sorting not working
Started by: jesseH-3
in: Toolset Professional Support
2
5
4 years, 7 months ago
jesseH-3
Archive Loop is repeating
Started by: nickK-8
in: Toolset Professional Support
2
6
4 years, 7 months ago
Minesh
Choosing Image Size with Toolset Image Block
Started by: JoelK2744
in: Toolset Professional Support
2
7
4 years, 7 months ago
JoelK2744
View block missing “field” dropdown
Started by: kipH
in: Toolset Professional Support
Quick solution available
Problem:
How to use View block in Toolset Map block.
Solution:
First of all, you will need to setup a custom address field.
Relevant Documentation:
2
21
4 years, 7 months ago
kipH
Display view of nearby places relative to the current view using block editor
Started by: Alexander Rothschild
in: Toolset Professional Support
2
24
4 years, 7 months ago
Alexander Rothschild
Existing custom value field is missing
Started by: matthiasV-2
in: Toolset Professional Support
2
4
4 years, 7 months ago
matthiasV-2
Cannot replace a search field in a view
Started by: matthiasV-2
in: Toolset Professional Support
2
3
4 years, 7 months ago
matthiasV-2
User managment
Started by: samuelH
in: Toolset Professional Support
2
2
4 years, 7 months ago
Waqar