I am trying to:
Create a view using the Loop Wizard
Link to a page where the issue can be seen:
I'm developing the site site locally. It's not online.
What I did:
I've created a post type for which I am trying to create a paginated view.
In the admin screen for creating a view, I'm using the Loop Wizard to create the view.
I walk through the wizard, and the wizard populates the textarea.
Then I try to save the view.
An error message comes up:
`The Loop cannot be saved because some required elements missing or are present more than once. Please make sure that your code contains those elements in correct order:
[wpv-layout-start] is missing or malformed.
[wpv-items-found] is missing or malformed.
<!-- wpv-loop-start --> is missing or malformed.
<!-- wpv-loop-end --> is missing or malformed.
[/wpv-items-found] is missing or malformed.
[wpv-layout-end] is missing or malformed.
This is a minimal example of Loop with mandatory elements that you can use as a reference:
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-layout-end]'
Hi, it sounds like the entire contents of the Loop Output were deleted at some point, then the Loop Wizard was run with an empty Loop Output editor. In this case, the required elements of the loop are not recreated for you automatically. Only the Loop contents are recreated. To solve this, delete everything from the Loop Output editor. Copy the following code and paste it in the empty Loop Output editor:
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-layout-end]
Now click Loop Wizard again to create the appropriate loop structure. The loop output code will be updated automatically, and the View should save successfully. If not, please let me know and I'll take a closer look.