Register this 2 ShortCodes:
global $total; function add_total_shortcode($atts, $content = '') { global $total; $total += wpv_do_shortcode($content); } add_shortcode('add-to-total', 'add_total_shortcode');
function show_total_shortcode() { global $total; $totalNew = $total; $total = 0; return $totalNew; } add_shortcode('show-total', 'show_total_shortcode');</code>
Register those ShortCodes in Views > Settings > Compatibility > 3rd Party ShortCodes
Use the ShortCodes in a View as this:
<wpv-loop> [add-to-total] [/add-to-total] </wpv-loop> [show-total]
Support Thread Example
Let us know if this snippet is not working for you:
This snippet doesn’t work