Tell us what you are trying to do?
I list the number of related posts available in two different views (that part works fine).
Now I would like to have a "Total amount", showing the amount of these two view posts together.
I think the attached image will explain better what I'm looking for.
Is there any documentation that you are following?
Can't find anything relevant in the forum.
Is there a similar example that we can see?
See images.
Hello,
There isn't such kind of built-in feature with Toolset plugins, you might consider custom JS codes, for example:
1) Get the post count value from those two HTML elements
2) Calculate the result, then update the specific HTML element value as what you want.
More help:
hidden link
Hi Luo,
That was actually my first thought as well, so I have started to look into this but...
In order to solve this, I need to be able to add [wpv-found-count] twice in the same table row/cell. And this is because each row is listing a post type that has related post types connected to it. In my case I have a post type called DAY (listed in one row) and two post types connected as INCOMING and OUTGOING (listed as a value in a cell in each row).
So my question is if it is possible to create a view, put it in my main view loop (the table output), and within that view also have 2 other views? One view for getting [wpv-found-count] for INCOMING and another for OUTGOING.
If that is possible, then I can perhaps add a JS-script that can calculate the two printed values (found count).
See image for what I'm looking for.
Also, is it possible to create this view on a different page (just to make it easier to work with, rather than fiddle around within table and cell) and then use a shortcode for it within the table cell?
The reason I want to add two views within a containing view, is to be able to add the JS-code that affects only these two views in this cell.
Or do you have any other suggestions on how I can get the values for wpw-found-count, for these two related post types and put them in a single cell?
Thanks!
Q1) So my question is if it is possible to create a view, put it in my main view loop (the table output), and within that view also have 2 other views? One view for getting [wpv-found-count] for INCOMING and another for OUTGOING.
No, as I mentioned above, there isn't such kind of built-in feature, [wpv-found-count] shortcode works only for one current post view.
See our document:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-found-count
Q2) Or do you have any other suggestions on how I can get the values for wpw-found-count, for these two related post types and put them in a single cell?
As I suggest above:
https://toolset.com/forums/topic/show-the-total-amount-of-two-post-views/#post-2320221
Please try with custom JS codes to get the calculated value.