Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php // Don't copy this line
- /*
- * BNE Testimonials Single Template Filter
- *
- * Allows adjusting the output of the single template by manually
- * changing the order or structure of the template parts.
- *
- * Note: When moving template parts around, keep in mind that some
- * themes may not longer display correctly such as cards-v and cards-h.
- *
- * Requires BNE Testimonials Pro v2.6+
- *
- * $output string initial output
- * $atts array shortcode arguments
- *
- * return $output
- *
- */
- function bne_testimonials_custom_single_template( $output, $atts ) {
- // Lets only apply this if the shortcode arrangement is set to custom
- if( $atts['arrangement'] != 'custom' ) {
- return $output;
- }
- // Reset existing output
- $output = '';
- // New content layout
- $output .= bne_testimonials_get_template( 'rating', $atts );
- $output .= bne_testimonials_get_template( 'tagline-website', $atts );
- $output .= bne_testimonials_get_template( 'message', $atts );
- $output .= bne_testimonials_get_template( 'image', $atts );
- $output .= bne_testimonials_get_template( 'name', $atts );
- $output .= bne_testimonials_get_template( 'date', $atts );
- return $output;
- }
- add_filter( 'bne_testimonials_single', 'bne_testimonials_custom_single_template', 10, 2 );
Add Comment
Please, Sign In to add comment