I propose the following update to account for the “no items found” condition. This is important if you’re outputting different raw text depending on whether or not results are found. For example, say you want to use a View to output a CSS class for some element. If results are found, you want to add class “a” but if no results are found you want to add class “b”.
Why don’t you use the same code but just replace the tags?
Instead of wpv-loop-start use wpv-nothing-found-start and just insert that to the HTML.
The parser will find the HTML comment and strip whatever is between…
I propose the following update to account for the “no items found” condition. This is important if you’re outputting different raw text depending on whether or not results are found. For example, say you want to use a View to output a CSS class for some element. If results are found, you want to add class “a” but if no results are found you want to add class “b”.
Why don’t you use the same code but just replace the tags?
Instead of wpv-loop-start use wpv-nothing-found-start and just insert that to the HTML.
The parser will find the HTML comment and strip whatever is between…
This does not work anymore, solution is here:
https://wp-types.com/forums/topic/custom-code-to-limit-parent-post-selector-is-not-compatible-with-select2/#post-598443