At the moment, you can display term fields on a View listing terms and on a term archive page.
There is no possibility to display them elsewhere, else how.
If you need a "raw" View Output, this is not something we provide, as Views is a Data Display engine, just as the rest of the Toolset display features, but you could apply some custom code, after a careful evaluation if it will fit your need.
The Custom Code is elaborated below.
1. The following snippet produces a clean View output, or as clean as we can:
add_filter( 'wpv_filter_wpv_view_shortcode_output', 'prefix_clean_view_output', 5, 2 );
function prefix_clean_view_output( $out, $id ) {
if ( $id == '375' ) {
$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;
}
2. Use a Views Loop similar to the one in the screenshot
3. Step by step:
- 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.
- Notice that, with this applied to a given View ID:
- Pagination, specially AJAX pagination, will not work.
- Parametric search, specially AJAXed parametric search, will not work.
- Other future features will not work either.
So this is to be used if and only if you know what you are doing and you are going to use the View output as source for anything else.
But also notice that this only clears the View structure.
Building as example JSON inside a View output is wrong because we can not address quoting problems.
Please use this with caution.