Hello i have a question.
I would to know if i have to create a view for each sentence i want to write with a custom taxonomie.
Exemple, now i do that : My bike is [wpv-view name="color"] (i have to create the view)
Exemple, i would like do that : My bike is [types termmeta="color"][/types]
And with my first solution, i have a css problem, the wpv-view is not inline display... it is difficult.
Thanks a lot
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Hello. Thank you for contacting the Toolset support.
Well - to display the view with clan/raw output you need to add the following code to your current Theme's functions.php file.
add_filter( 'wpv_filter_wpv_view_shortcode_output', 'prefix_naked_view_output', 5, 2 );
function prefix_naked_view_output( $out, $view_id ) {
// replace with your own comma separated list of View IDs
$views_to_target = array(599,3948,3026) ;
if ( in_array($view_id, $views_to_target)) { // add test for View 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;
}
Where:
- Replace your view id/ids with $views_to_target array variable .
Hello,
Thanks for your answer.
If i understood, i have to create a view to use taxonomie field, but with this code i won't have problem with css ?
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Well - with above code what ever view you will use, it will just output the content you have added to your view's loop output section and you can style your content accordingly.