Skip Navigation

[Resolved] Add custom taxonomie field

This support ticket is created 7 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 4 replies, has 2 voices.

Last updated by Franck 7 years, 2 months ago.

Assisted by: Minesh.

Author
Posts
#566128

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

#566311

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 .

#566316

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 ?

#566319

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.

#566981

Thanks a lot