Hi,
I have a basic situation, but running into a brick wall on it:
I have a VIEWS loop, listing all posts in chronological order (Basic thumbnail, title, excerpt) for user to then click on and see full posts. (A basic blog roll).
Every X number of posts on this list, I'd like to insert an advertisement. So my programming is:
<wpv-loop wrap="5" pad="true">
[wpv-item index=3]
CALL ANOTHER VIEW TO INSERT AD
MAIN CONTENT
[wpv-item index=other]
MAIN CONTENT
</wpv-loop>
So the above works, BUT, I need the 2nd VIEW to show ads by descending by date. The problem is every time this code calls up VIEW#2 it start it from the top (first) post. I need a way to increment it each time it's called.
Makes sense?
I feel that views might have a simple solution for this, other than having to create some form of php counter. If that is the only option though, I'd wondering if you could get me going on it.
If you have a view, that presents any results without any query, it will just do that:
Present the results, as many times you insert it to a page or view or content Template.
There is no way to "count" thru them.
So, if you insert that View once, and tell the code to repeat it every third item, it will do exactly that.
It will display ALL results every third item.
Unfortunately there is no solution with Views for your issue.
The only what you could do is to display one result only, and order randomly.
That would produce a different result in each of the index-items.
But that is not what you want, as far I understand.
It seems -unfortunately- that for now you need custom programming work which is beyond the scope of our support.
At this point I would suggest you consider contacting one of our certified partners from this link:
https://toolset.com/consultant/
You will get the custom assistance you need to get on with your project.