Support » Plugin: Strong Testimonials » Where is the shortcode data stored

  • Resolved Onno454

    (@onno454)


    Hi there,
    Can you please tell me where and how you store the data for the shortcodes: [testimonial_count] and [testimonial_average_rating]?

    Thank you so much!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support mplusb

    (@mplusb)

    Hello @onno454,

    That information is not stored in the database.
    [testimonial_count] counts all the published testimonials and displays the number.
    And testimonial_average_rating takes all the testimonials that have a rating and calculates the average.

    All the best,
    Mihaela

    Thanks Mihaela
    When using do_shortcode in PHP it shows the value, but also HTML div’s/span’s.
    Is there a way to get rid of this HTML to keep only the value, is there maybe a global variable for the count & average that I can use? or another way?
    Thanks again!

    Plugin Support mplusb

    (@mplusb)

    Hello @onno454,

    [testimonial_count] should only display only the value, without any other tags.
    If it does then please try [testimonial_count unformatted]
    And for [testimonial_average_rating] you can use this filter:

    <?php
    ‚Äč
    function wpmtst_average_rating_pre_html_filter( $html, $atts, $summary ) {
    	return $summary['rating_average'];
    }
    add_filter('wpmtst_average_rating_pre_html', 'wpmtst_average_rating_pre_html_filter', 10, 3 );

    And it will only display media without other html.

    All the best,
    Mihaela

    Thank you Mihaela!
    Works flawless. You’re the greatest!

    Plugin Support mplusb

    (@mplusb)

    Happy to hear it works, @onno454!

    Rock on,
    Mihaela

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Where is the shortcode data stored’ is closed to new replies.