Guest User

Untitled

a guest
May 20th, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. <?php // Don't copy this line
  2.  
  3. /*
  4. * BNE Testimonials Single Template Filter
  5. *
  6. * Allows adjusting the output of the single template by manually
  7. * changing the order or structure of the template parts.
  8. *
  9. * Note: When moving template parts around, keep in mind that some
  10. * themes may not longer display correctly such as cards-v and cards-h.
  11. *
  12. * Requires BNE Testimonials Pro v2.6+
  13. *
  14. * $output string initial output
  15. * $atts array shortcode arguments
  16. *
  17. * return $output
  18. *
  19. */
  20. function bne_testimonials_custom_single_template( $output, $atts ) {
  21.  
  22. // Lets only apply this if the shortcode arrangement is set to custom
  23. if( $atts['arrangement'] != 'custom' ) {
  24. return $output;
  25. }
  26.  
  27. // Reset existing output
  28. $output = '';
  29.  
  30. // New content layout
  31. $output .= bne_testimonials_get_template( 'rating', $atts );
  32. $output .= bne_testimonials_get_template( 'tagline-website', $atts );
  33. $output .= bne_testimonials_get_template( 'message', $atts );
  34. $output .= bne_testimonials_get_template( 'image', $atts );
  35. $output .= bne_testimonials_get_template( 'name', $atts );
  36. $output .= bne_testimonials_get_template( 'date', $atts );
  37.  
  38.  
  39. return $output;
  40. }
  41. add_filter( 'bne_testimonials_single', 'bne_testimonials_custom_single_template', 10, 2 );
Add Comment
Please, Sign In to add comment