Not sure offhand, but we can try some troubleshooting steps to see what is happening.
- Double-check to be sure you registered the shortcodes accurately in Toolset > Settings > Front-end content: Third-party shortcode arguments. You should see add-to-total and show-total in the registered functions list.
- Edit the View and add the following code somewhere inside the wpv-loop tags (but not inside either of the add-to-total shortcodes):
Test link to post: [wpv-post-link]<br />
Test bookwords value: [types field='bookwords' format='FIELD_VALUE'][/types], raw: [types field='bookwords' output='raw'][/types]<br />
Test otherwords value: [types field='otherwords' format='FIELD_VALUE'][/types], raw: [types field='otherwords' output='raw'][/types]<br />
- Check the results on the front-end of the site. Take a screenshot and include that in your next reply.
- Edit this View and find the Query Filter panel. If you cannot see the Query Filter panel, scroll to the top right corner of the View editor screen and click "Screen Options". You can activate the Query Filter panel here.
- Edit or toggle open all the Query Filters and take screenshot(s) showing all Query Filter configurations. Include those screenshots in your next reply.
- Copy the complete contents of the Loop Editor panel and paste that code in your next reply.
- Check the post status of all the posts that you expect to see in the View results. If the statuses are anything other than Published, you may need to add/adjust a post status Query Filter to accommodate those statuses. By default, Draft and Pending Review posts are not displayed in a View on the front-end.
- Temporarily deactivate all plugins except Types, Views, and Elementor, and temporarily activate the default Twenty Twenty One theme. Temporarily deactivate any custom code snippets you have in Toolset > Settings > Custom Code, then create a new code snippet to replace the code from the now inactive functions.php file:
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');
Set the snippet to run everywhere and activate the snippet. Reload the page and be sure the snippet is active - there is a glitch with activating new snippets, so double-check and activate again if necessary, reload the page and confirm it's active.
Test the View again. If the results are different, there is a conflict somewhere. Deactivate/delete the new snippet. Reactivate your theme, then other plugins, then other custom snippets, one-by-one, testing each time until the problem returns. See if you can isolate one component as the source of this problem.
Let me know the results of these tests and we can go from there.