Thank you for contacting us here in the Support Forum
This is because since Views 1.1.11, the Views loop output is wrapped in some default HTML.
This HTML (div) will not allow to put Views Loop output inline with other content anymore.
Why this has been done?
To support new features of Views, such as infinite Scrolling as example.
Since Views was and is designed to create lists and displays of content, it is wrapping this content in HTML, to provide best support for all features.
What can you do to solve this?
You can apply a filter in your functions.php, which will remove this HTML wrapper and provide a "Results only" loop output.
Please acknowledge that it will also mean, features like:
- Pagination, specially AJAX pagination, will not work.
- Parametric search, specially AJAXed parametric search, will not work.
- Other future features will not work either (endless scroll, future feature "sort by" in the front end, etc)
What does the filter do:
- It hooks early in the View output.
- Priority 5 is mandatory as we already do some other cleaning at priority 10.
- It only affects a View with an ID of 375, adjust acordingly if needed!
- It only affects Views with actual results: if the View matches no result, the same “No items found” or whatever you have between the wpv-no-items-found shortcode applies.
- It returns only what is between the HTML comments <!– wpv-loop-start –> and <!– wpv-loop-end –> , excluding them. Only content between those HTML comments is returned, as is.
The filter:
add_filter( 'wpv_filter_wpv_view_shortcode_output', 'prefix_clean_view_output', 5, 2 );
function prefix_clean_view_output( $out, $id ) {
if ( $id == '375' ) { //Adjust ID
$start = strpos( $out, '<!-- wpv-loop-start -->' );
if (
$start !== false
&& strrpos( $out, '<!-- wpv-loop-end -->', $start ) !== false
) {
$start = $start + strlen( '<!-- wpv-loop-start -->' );
$out = substr( $out , $start );
$end = strrpos( $out, '<!-- wpv-loop-end -->' );
$out = substr( $out, 0, $end );
}
}
return $out;
}
Please let me know if the above solution works for you, I look forward to your reply!
Thank you for your patience.