{"id":1361,"date":"2023-10-31T14:47:12","date_gmt":"2023-10-31T14:47:12","guid":{"rendered":"https:\/\/wpshortcode.org\/?p=1361"},"modified":"2023-10-31T14:47:13","modified_gmt":"2023-10-31T14:47:13","slug":"testimonials-widget","status":"publish","type":"post","link":"https:\/\/wpshortcode.org\/testimonials-widget\/","title":{"rendered":"Testimonials Widget Shortcodes"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Below, you&#8217;ll find a detailed guide on how to add the <strong>Testimonials Widget Shortcodes<\/strong> to your WordPress website, including their <strong>parameters<\/strong>, <strong>examples<\/strong>, and <strong>PHP function code<\/strong>. Additionally, we&#8217;ll assist you with common issues that might cause the Testimonials Widget Plugin shortcodes not to show or not to work correctly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before starting, here is an overview of the Testimonials Widget Plugin and the shortcodes it provides:<\/p>\n\n\n<p>    <div class=\"plugin-info-box\">\n        <div class=\"top-main\">\n            <!-- SVG Image -->\n            <div class=\"plugin-image\">\n                <img decoding=\"async\" src=\"https:\/\/ps.w.org\/testimonials-widget\/assets\/icon-128x128.jpeg?rev=997088\" alt=\"Plugin Icon\" \/>\n            <\/div>\n            \n            <div class=\"plugin-descriptive-part\">\n                <!-- Plugin Name with Link -->\n\n                    <a class=\"plugin-title\" href=\"https:\/\/wordpress.org\/plugins\/testimonials-widget\" target=\"_blank\" rel=\"noopener\">\n                        Testimonials Widget                    <\/a>\n\n\n                <!-- Plugin Description -->\n                <p class=\"plugin-description\">\n                    &quot;Testimonials Widget is a powerful WordPress plugin that allows you to easily display and manage customer testimonials on your website, enhancing credibility and trust.&quot;                <\/p>\n            <\/div>\n        <\/div>\n\n        <!-- Rating and Additional Info -->\n        <div class=\"plugin-meta\">\n            <span class=\"plugin-rating\">\n                <span class='stars'>\u2605\u2605\u2605\u2605\u2729<\/span> (117)\n            <\/span>\n            <span class=\"plugin-active-installs\">\n                <strong>Active Installs<\/strong>: 10000+\n            <\/span>\n            <span class=\"plugin-tested\">\n                <strong>Tested with<\/strong>: 5.9.8            <\/span>\n            <span class=\"plugin-php-version\">\n                <strong>PHP Version<\/strong>: false            <\/span>\n        <\/div>\n\n        <!-- List of Included Shortcodes -->\n        <div class=\"plugin-shortcodes\">\n            <strong>Included Shortcodes:<\/strong>\n            <ul>\n                <li>[testimonialswidgetpremium_form]<\/li><li>[testimonialswidgetpremium_count]<\/li><li>[testimonialswidgetpremium_link_list]<\/li><li>[testimonials]<\/li><li>[testimonialswidget_widget]<\/li><li>[testimonials_archives]<\/li><li>[testimonials_categories]<\/li><li>[testimonials_examples]<\/li><li>[testimonials_options]<\/li><li>[testimonials_recent]<\/li><li>[testimonials_tag_cloud]<\/li>            <\/ul>\n        <\/div>\n    <\/div>\n    <\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Testimonials Widget [testimonialswidgetpremium_form] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Testimonials Widget Premium shortcode is used to generate a form for gathering user testimonials. It handles form submission, validation, and response. \n\n\n\nThis shortcode initiates the testimonials form, sets headers to prevent caching, and validates the form inputs. It also handles file attachments and featured images. If the form submission is valid, it saves the input and redirects to a thank-you page. If not, it generates an error message and provides debugging help for website managers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[testimonialswidgetpremium_form]<\/code><\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Parameters<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a list of all possible testimonialswidgetpremium_form shortcode parameters and attributes:<\/p>\n\n\n<p>Based on the given code, it appears that there are no shortcode parameters directly associated with the &#8216;testimonialswidgetpremium_form&#8217; shortcode. So, we will use the specified text:<\/p>\n<p>NO_PARAMS<\/p>\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Examples and Usage<\/h3>\n\n\n<p><strong>Basic example<\/strong> &#8211; Displaying a testimonials form using the shortcode without any additional parameters.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[testimonialswidgetpremium_form]<\/code><\/pre>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Function Code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In case you have difficulties debugging what causing issues with <code>[testimonialswidgetpremium_form]<\/code> shortcode, check below the related PHP functions code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode line<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_shortcode( 'testimonialswidgetpremium_form', array( $this, 'testimonials_form' ) );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode PHP function<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; light: false; title: ; toolbar: true; notranslate\" title=\"\">\nfunction testimonials_form( $atts ) {\n\t\tnocache_headers();\n\n\t\t$instance = self::set_instance();\n\n\t\tif ( empty( self::$form_options ) ) {\n\t\t\tself::form_options();\n\t\t}\n\n\t\t$atts = wp_parse_args( $atts, Axl_Testimonials_Widget::get_defaults() );\n\t\t$atts = Axl_Testimonials_Widget_Settings::validate_settings( $atts );\n\n\t\t$atts&#91;&#039;type&#039;] = self::ID;\n\t\t$content      = null;\n\t\t$validated    = null;\n\t\t$valid_submit = true;\n\n\t\tif ( ! empty( $_POST&#91; self::$form_base ] ) &amp;&amp; wp_verify_nonce( $_POST&#91; __CLASS__ ], &#039;add&#039; ) ) {\n\t\t\t$hide_are_you_human = tw_get_option( &#039;hide_are_you_human&#039; );\n\n\t\t\t$input = $_POST&#91; self::$form_base ];\n\t\t\t$input = wp_parse_args( $input, $atts );\n\n\t\t\tif ( ! empty( $input&#91;&#039;attach_id&#039;] ) ) {\n\t\t\t\t$input&#91;&#039;featured_image&#039;] = $input&#91;&#039;attach_id&#039;];\n\t\t\t}\n\n\t\t\tif ( ! empty( $_FILES ) ) {\n\t\t\t\t$file_arr = $_FILES&#91; self::$form_base ];\n\t\t\t\tif ( ! empty( $file_arr&#91;&#039;name&#039;]&#91;&#039;featured_image&#039;] ) ) {\n\t\t\t\t\t$file = $file_arr&#91;&#039;name&#039;]&#91;&#039;featured_image&#039;];\n\n\t\t\t\t\t$input&#91;&#039;featured_image&#039;] = $file;\n\t\t\t\t}\n\t\t\t} elseif ( ! empty( $input&#91;&#039;featured_image_url&#039;] ) ) {\n\t\t\t\t$input&#91;&#039;featured_image&#039;] = $input&#91;&#039;featured_image_url&#039;];\n\t\t\t}\n\n\t\t\t$validated = Axl_Testimonials_Widget_Settings::validate_settings( $input, self::$form_options, true );\n\n\t\t\t$twp_as       = new Axl_Testimonials_Widget_Premium_Antispam( $validated&#91;&#039;input&#039;] );\n\t\t\t$valid_submit = $twp_as-&gt;is_valid();\n\t\t\tif ( ! $valid_submit &amp;&amp; empty( $validated&#91;&#039;errors&#039;] ) ) {\n\t\t\t\t$msg_as = Axl_Testimonials_Widget_Premium::get_template_part( &#039;testimonial&#039;, &#039;form-thank-you&#039; );\n\n\t\t\t\tif ( ! $hide_are_you_human ) {\n\t\t\t\t\t$msg_as .= Axl_Testimonials_Widget_Premium::get_template_part( &#039;testimonial&#039;, &#039;form-anti-spam&#039; );\n\t\t\t\t}\n\n\t\t\t\t$content = $msg_as;\n\n\t\t\t\tif ( current_user_can( &#039;manage_options&#039; ) ) {\n\t\t\t\t\t$text  = &#039;&lt;h2&gt;&#039;;\n\t\t\t\t\t$text .= esc_html__( &#039;Antispam Debug Help Text&#039;, &#039;testimonials-widget-premium&#039; );\n\t\t\t\t\t$text .= &#039;&lt;\/h2&gt;&#039;;\n\t\t\t\t\t$text .= &#039;&lt;h4&gt;&#039;;\n\t\t\t\t\t$text .= esc_html__( &#039;This section is shown only to website managers&#039;, &#039;testimonials-widget-premium&#039; );\n\t\t\t\t\t$text .= &#039;&lt;\/h4&gt;&#039;;\n\t\t\t\t\t$text .= &#039;&lt;p&gt;&#039;;\n\t\t\t\t\t$text .= self::text_debug_antispam();\n\t\t\t\t\t$text .= &#039;&lt;\/p&gt;&#039;;\n\n\t\t\t\t\t$content .= $text;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$validated&#91;&#039;input&#039;]&#91;&#039;hpsc_session&#039;] = self::get_hpsc_session( true );\n\t\t\t}\n\n\t\t\tif ( $valid_submit &amp;&amp; empty( $validated&#91;&#039;errors&#039;] ) ) {\n\t\t\t\t$validated&#91;&#039;input&#039;] = self::save_form( $validated&#91;&#039;input&#039;] );\n\n\t\t\t\t$thank_you_page = tw_get_option( &#039;thank_you_page&#039; );\n\t\t\t\tif ( ! empty( $thank_you_page ) ) {\n\t\t\t\t\t$thank_you_link = $thank_you_page;\n\t\t\t\t\tif ( preg_match( &#039;#^\\d+$#&#039;, $thank_you_link ) ) {\n\t\t\t\t\t\t$link = get_permalink( $thank_you_link );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$do_http = true;\n\t\t\t\t\t\tif ( 0 === strpos( $thank_you_link, &#039;\/&#039; ) ) {\n\t\t\t\t\t\t\t$do_http = false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( $do_http &amp;&amp; 0 === preg_match( &#039;#https?:\/\/#&#039;, $thank_you_link ) ) {\n\t\t\t\t\t\t\t$thank_you_link = &#039;http:\/\/&#039; . $thank_you_link;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$link = $thank_you_link;\n\t\t\t\t\t}\n\n\t\t\t\t\t$validated&#91;&#039;input&#039;]&#91;&#039;thank_you_page_link&#039;] = $link;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( ! $hide_are_you_human ) {\n\t\t\t\tunset( $validated&#91;&#039;input&#039;]&#91;&#039;are_you_human&#039;] );\n\t\t\t}\n\t\t}\n\n\t\tif ( empty( $content ) ) {\n\t\t\t$content = self::show_form( $atts, $validated );\n\t\t}\n\n\t\tAxl_Testimonials_Widget::call_scripts_styles( array(), $atts, $instance );\n\n\t\treturn $content;\n\t}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Code file location<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">testimonials-widget\/testimonials-widget\/includes\/class-testimonials-widget-premium-form.php<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Testimonials Widget [testimonialswidgetpremium_count] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Testimonials Widget Premium shortcode is used to count the total number of testimonials. \n\n\n\nThe shortcode retrieves all testimonials, counts them, and returns the total. It uses the WP_Query class to fetch testimonials and applies filters for caching, enhancing performance.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[testimonialswidgetpremium_count]<\/code><\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Examples and Usage<\/h3>\n\n\n<p><strong>Basic example<\/strong> &#8211; Display the total count of testimonials in the database.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[testimonialswidgetpremium_count]<\/code><\/pre>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Function Code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In case you have difficulties debugging what causing issues with <code>[testimonialswidgetpremium_count]<\/code> shortcode, check below the related PHP functions code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode line<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_shortcode( 'testimonialswidgetpremium_count', array( __CLASS__, 'testimonials_count' ) );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode PHP function<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; light: false; title: ; toolbar: true; notranslate\" title=\"\">\nfunction testimonials_count( $atts ) {\n\t\t$atts = wp_parse_args( $atts, Axl_Testimonials_Widget::get_defaults() );\n\t\t$atts = Axl_Testimonials_Widget_Settings::validate_settings( $atts );\n\n\t\t$atts&#91;&#039;limit&#039;] = -1;\n\t\t$atts&#91;&#039;type&#039;]  = &#039;testimonials_count&#039;;\n\n\t\t$instance              = Axl_Testimonials_Widget::add_instance();\n\t\t$atts&#91;&#039;widget_number&#039;] = $instance;\n\t\t$atts&#91;&#039;fields&#039;]        = &#039;ids&#039;;\n\n\t\t$testimonials = array();\n\n\t\t$count = apply_filters( &#039;tw_cache_get&#039;, false, $atts );\n\t\tif ( false === $count ) {\n\t\t\t$args         = Axl_Testimonials_Widget::get_query_args( $atts );\n\t\t\t$testimonials = new WP_Query( $args );\n\n\t\t\t$count = $testimonials-&gt;post_count;\n\t\t\t$count = apply_filters( &#039;tw_cache_set&#039;, $count, $atts );\n\t\t}\n\n\t\tAxl_Testimonials_Widget::call_scripts_styles( $testimonials, $atts, $instance );\n\n\t\treturn $count;\n\t}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Code file location<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">testimonials-widget\/testimonials-widget\/includes\/class-testimonials-widget-premium.php<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Testimonials Widget [testimonialswidgetpremium_link_list] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Testimonials Widget Premium shortcode facilitates the display of testimonial links on your webpage. \n\n\n\nThe shortcode fetches testimonial links based on specified attributes. It checks for pagination and sets the &#8216;type&#8217; to &#8216;testimonials_links&#8217;. It then generates an instance, retrieves testimonials, and applies necessary filters. The final content is returned for display.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[testimonialswidgetpremium_link_list]<\/code><\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Parameters<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a list of all possible testimonialswidgetpremium_link_list shortcode parameters and attributes:<\/p>\n\n\n<ul>\n<li><code>paged<\/code> &#8211; Determines the page number for pagination.<\/li>\n<li><code>type<\/code> &#8211; Defines the type of testimonial, set as &#8216;testimonials_links&#8217;.<\/li>\n<li><code>widget_number<\/code> &#8211; The unique number for the widget instance.<\/li>\n<\/ul>\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Examples and Usage<\/h3>\n\n\n<p><strong>Basic example<\/strong> &#8211; The basic usage of the testimonials shortcode. This will display the testimonials as per the default settings.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[testimonialswidgetpremium_link_list \/]<\/code><\/pre>\n\n\n<p><strong>Advanced examples<\/strong><\/p>\n<p>Displaying testimonials with a specified page number. This will show the testimonials on the specified page number, in this case, page 2.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[testimonialswidgetpremium_link_list paged=2 \/]<\/code><\/pre>\n\n\n<p>Displaying testimonials of a specific type. This will show only the testimonials that have been categorized under the &#8216;premium&#8217; type.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[testimonialswidgetpremium_link_list type='premium' \/]<\/code><\/pre>\n\n\n<p>Combining different parameters. This example displays the testimonials categorized under &#8216;premium&#8217; type from page 2.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[testimonialswidgetpremium_link_list type='premium' paged=2 \/]<\/code><\/pre>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Function Code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In case you have difficulties debugging what causing issues with <code>[testimonialswidgetpremium_link_list]<\/code> shortcode, check below the related PHP functions code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode line<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_shortcode( 'testimonialswidgetpremium_link_list', array( __CLASS__, 'testimonials_links' ) );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode PHP function<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; light: false; title: ; toolbar: true; notranslate\" title=\"\">\nfunction testimonials_links( $atts ) {\n\t\t$atts = wp_parse_args( $atts, Axl_Testimonials_Widget::get_defaults() );\n\t\t$atts = Axl_Testimonials_Widget_Settings::validate_settings( $atts );\n\n\t\tif ( get_query_var( &#039;paged&#039; ) ) {\n\t\t\t$atts&#91;&#039;paged&#039;] = get_query_var( &#039;paged&#039; );\n\t\t} elseif ( get_query_var( &#039;page&#039; ) ) {\n\t\t\t$atts&#91;&#039;paged&#039;] = get_query_var( &#039;page&#039; );\n\t\t} else {\n\t\t\t$atts&#91;&#039;paged&#039;] = 1;\n\t\t}\n\n\t\t$atts&#91;&#039;type&#039;] = &#039;testimonials_links&#039;;\n\n\t\t$instance              = Axl_Testimonials_Widget::add_instance();\n\t\t$atts&#91;&#039;widget_number&#039;] = $instance;\n\n\t\t$testimonials = array();\n\n\t\t$content = apply_filters( &#039;tw_cache_get&#039;, false, $atts );\n\t\tif ( false === $content ) {\n\t\t\t$testimonials = Axl_Testimonials_Widget::get_testimonials( $atts );\n\t\t\t$content      = self::get_testimonials_html_links( $testimonials, $atts );\n\t\t\t$content      = apply_filters( &#039;tw_cache_set&#039;, $content, $atts );\n\t\t}\n\n\t\tAxl_Testimonials_Widget::call_scripts_styles( $testimonials, $atts, $instance );\n\n\t\treturn $content;\n\t}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Code file location<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">testimonials-widget\/testimonials-widget\/includes\/class-testimonials-widget-premium.php<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Testimonials Widget [testimonials] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Testimonials-Widget shortcode is designed to display testimonials on your WordPress site. It retrieves the testimonials from the database, applies filters to the content, and returns the final output.\n\n\n\nThis shortcode takes page number as an attribute and fetches the corresponding testimonials. It also includes caching to improve performance. The shortcode also triggers necessary scripts and styles.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[testimonials]<\/code><\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Parameters<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a list of all possible testimonials shortcode parameters and attributes:<\/p>\n\n\n<ul>\n<li><code>atts<\/code> &#8211; array of attributes used to customize the testimonials display.<\/li>\n<li><code>paged<\/code> &#8211; determines the page number for pagination.<\/li>\n<li><code>type<\/code> &#8211; specifies the type of content, in this case, &#8216;testimonials&#8217;.<\/li>\n<li><code>widget_number<\/code> &#8211; unique identifier of the instance of the widget.<\/li>\n<\/ul>\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Examples and Usage<\/h3>\n\n\n<p><strong>Basic example<\/strong> &#8211; Showcases a simple usage of the &#8216;testimonials&#8217; shortcode without any additional parameters.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[testimonials \/]<\/code><\/pre>\n\n\n<p><strong>Advanced examples<\/strong><\/p>\n<p>Utilize the shortcode to display testimonials on a specific page. The page will load testimonials based on the &#8216;paged&#8217; parameter value.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[testimonials paged=2 \/]<\/code><\/pre>\n\n\n<p>Display testimonials using the shortcode with multiple parameters. This example illustrates how to use the &#8216;paged&#8217; and &#8216;type&#8217; parameters to display testimonials from a specific page and type.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[testimonials paged=2 type='client' \/]<\/code><\/pre>\n\n\n<p>Using the shortcode to display testimonials with a specific widget number. The testimonials will be loaded according to the &#8216;widget_number&#8217; parameter.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[testimonials widget_number=3 \/]<\/code><\/pre>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Function Code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In case you have difficulties debugging what causing issues with <code>[testimonials]<\/code> shortcode, check below the related PHP functions code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode line<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_shortcode( 'testimonials', array( __CLASS__, 'testimonials' ) );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode PHP function<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; light: false; title: ; toolbar: true; notranslate\" title=\"\">\nfunction testimonials( $atts ) {\n\t\t$atts = wp_parse_args( $atts, self::get_defaults() );\n\t\t$atts = Axl_Testimonials_Widget_Settings::validate_settings( $atts );\n\n\t\tif ( get_query_var( &#039;paged&#039; ) ) {\n\t\t\t$atts&#91;&#039;paged&#039;] = get_query_var( &#039;paged&#039; );\n\t\t} elseif ( get_query_var( &#039;page&#039; ) ) {\n\t\t\t$atts&#91;&#039;paged&#039;] = get_query_var( &#039;page&#039; );\n\t\t} else {\n\t\t\t$atts&#91;&#039;paged&#039;] = 1;\n\t\t}\n\n\t\t$atts&#91;&#039;type&#039;] = &#039;testimonials&#039;;\n\n\t\t$instance              = self::add_instance();\n\t\t$atts&#91;&#039;widget_number&#039;] = $instance;\n\n\t\t$testimonials = array();\n\n\t\t$content = apply_filters( &#039;tw_cache_get&#039;, false, $atts );\n\t\tif ( false === $content ) {\n\t\t\t$testimonials = self::get_testimonials( $atts );\n\t\t\t$content      = self::get_testimonials_html( $testimonials, $atts );\n\t\t\t$content      = apply_filters( &#039;tw_cache_set&#039;, $content, $atts );\n\t\t}\n\n\t\tself::call_scripts_styles( $testimonials, $atts, $instance );\n\n\t\treturn $content;\n\t}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Code file location<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">testimonials-widget\/testimonials-widget\/includes\/class-testimonials-widget.php<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Testimonials Widget [testimonialswidget_widget] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Testimonials Widget shortcode is a PHP function that displays a testimonials slider on a WordPress site. It parses arguments, validates settings, and retrieves testimonials.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[testimonialswidget_widget]<\/code><\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Parameters<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a list of all possible testimonialswidget_widget shortcode parameters and attributes:<\/p>\n\n\n<ul>\n<li><code>random<\/code> &#8211; If set, testimonials will be displayed in a random order.<\/li>\n<li><code>paging<\/code> &#8211; This parameter is always false, meaning pagination is not used in the testimonials slider.<\/li>\n<li><code>type<\/code> &#8211; Identifies the type of widget, in this case, it&#8217;s a testimonials slider.<\/li>\n<li><code>widget_number<\/code> &#8211; Unique identifier of the testimonials slider widget.<\/li>\n<\/ul>\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Examples and Usage<\/h3>\n\n\n<p><strong>Basic Example<\/strong> &#8211; A simple usage of the testimonials-widget plugin shortcode to display testimonials in a slider format.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[testimonialswidget_widget \/]<\/code><\/pre>\n\n\n<p><strong>Advanced Examples<\/strong><\/p>\n<p>Displaying the testimonials in a slider format with random order. If the &#8216;random&#8217; attribute is not set, it will be set to 1 by default. This shortcode will randomize the testimonials that are displayed.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[testimonialswidget_widget random=1 \/]<\/code><\/pre>\n\n\n<p>Setting a specific widget number. If the &#8216;widget_number&#8217; attribute is not set, it will be incremented by 1 each time. This shortcode will display the testimonials slider with a specific widget number.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[testimonialswidget_widget widget_number=5 \/]<\/code><\/pre>\n\n\n<p>Combining multiple attributes. This shortcode will display the testimonials in a slider format, with a specific widget number and in a random order.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[testimonialswidget_widget random=1 widget_number=5 \/]<\/code><\/pre>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Function Code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In case you have difficulties debugging what causing issues with <code>[testimonialswidget_widget]<\/code> shortcode, check below the related PHP functions code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode line<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_shortcode( 'testimonialswidget_widget', array( __CLASS__, 'testimonials_slider' ) );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode PHP function<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; light: false; title: ; toolbar: true; notranslate\" title=\"\">\nfunction testimonials_slider( $atts, $widget_number = null ) {\n\t\tif ( is_null( $atts ) || ! is_array( $atts ) ) {\n\t\t\t$atts = array();\n\t\t}\n\n\t\tif ( empty( $widget_number ) ) {\n\t\t\t$widget_number = self::$widget_number++;\n\n\t\t\tif ( ! isset( $atts&#91;&#039;random&#039;] ) ) {\n\t\t\t\t$atts&#91;&#039;random&#039;] = 1;\n\t\t\t}\n\t\t}\n\n\t\t$atts = wp_parse_args( $atts, self::get_defaults() );\n\t\t$atts = Axl_Testimonials_Widget_Settings::validate_settings( $atts );\n\n\t\t$atts&#91;&#039;paging&#039;] = false;\n\t\t$atts&#91;&#039;type&#039;]   = &#039;testimonials_slider&#039;;\n\n\t\tself::set_instance( $widget_number );\n\t\t$atts&#91;&#039;widget_number&#039;] = $widget_number;\n\n\t\t$testimonials = array();\n\n\t\t$content = apply_filters( &#039;tw_cache_get&#039;, false, $atts );\n\t\tif ( false === $content ) {\n\t\t\t$testimonials = self::get_testimonials( $atts );\n\t\t\t$content      = self::get_testimonials_html( $testimonials, $atts, false, $widget_number );\n\t\t\t$content      = apply_filters( &#039;tw_cache_set&#039;, $content, $atts );\n\t\t}\n\n\t\tself::call_scripts_styles( $testimonials, $atts, $widget_number );\n\n\t\treturn $content;\n\t}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Code file location<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">testimonials-widget\/testimonials-widget\/includes\/class-testimonials-widget.php<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Testimonials Widget [testimonials_archives] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Testimonials-widget shortcode is designed to archive testimonials. It parses arguments, validates settings, and sets the type to &#8216;testimonials_archives&#8217;. \n\n\n\nIt generates an instance, retrieves cached content, and if not available, gets archive HTML. It then applies cache filters and calls scripts\/styles.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[testimonials_archives]<\/code><\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Examples and Usage<\/h3>\n\n\n<p><strong>Basic example<\/strong> &#8211; The following shortcode will display the testimonials archives with default settings.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[testimonials_archives \/]<\/code><\/pre>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Function Code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In case you have difficulties debugging what causing issues with <code>[testimonials_archives]<\/code> shortcode, check below the related PHP functions code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode line<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_shortcode( 'testimonials_archives', array( __CLASS__, 'testimonials_archives' ) );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode PHP function<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; light: false; title: ; toolbar: true; notranslate\" title=\"\">\nfunction testimonials_archives( $atts, $widget_number = null ) {\n\t\t$atts = wp_parse_args( $atts, Axl_Testimonials_Widget_Archives_Widget::get_defaults() );\n\t\t$atts = Axl_Testimonials_Widget_Archives_Widget::validate_settings( $atts );\n\n\t\t$atts&#91;&#039;type&#039;] = &#039;testimonials_archives&#039;;\n\n\t\t$instance              = ! empty( $widget_number ) ? $widget_number : self::add_instance();\n\t\t$atts&#91;&#039;widget_number&#039;] = $instance;\n\n\t\t$content = apply_filters( &#039;tw_cache_get&#039;, false, $atts );\n\t\tif ( false === $content ) {\n\t\t\t$content = self::get_archives_html( $atts );\n\t\t\t$content = apply_filters( &#039;tw_cache_set&#039;, $content, $atts );\n\t\t}\n\n\t\tself::call_scripts_styles( array(), $atts, $instance );\n\n\t\treturn $content;\n\t}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Code file location<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">testimonials-widget\/testimonials-widget\/includes\/class-testimonials-widget.php<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Testimonials Widget [testimonials_categories] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Testimonials-Widget plugin shortcode is used to display categories of testimonials on your website. It validates settings, retrieves category data, and generates HTML content for display.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[testimonials_categories]<\/code><\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Examples and Usage<\/h3>\n\n\n<p><strong>Basic example<\/strong> &#8211; The following shortcode will display the testimonials categories without any additional parameters.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[testimonials_categories \/]<\/code><\/pre>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Function Code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In case you have difficulties debugging what causing issues with <code>[testimonials_categories]<\/code> shortcode, check below the related PHP functions code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode line<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_shortcode( 'testimonials_categories', array( __CLASS__, 'testimonials_categories' ) );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode PHP function<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; light: false; title: ; toolbar: true; notranslate\" title=\"\">\nfunction testimonials_categories( $atts, $widget_number = null ) {\n\t\t$atts = wp_parse_args( $atts, Axl_Testimonials_Widget_Categories_Widget::get_defaults() );\n\t\t$atts = Axl_Testimonials_Widget_Categories_Widget::validate_settings( $atts );\n\n\t\t$atts&#91;&#039;type&#039;] = &#039;testimonials_categories&#039;;\n\n\t\t$instance              = ! empty( $widget_number ) ? $widget_number : self::add_instance();\n\t\t$atts&#91;&#039;widget_number&#039;] = $instance;\n\n\t\t$content = apply_filters( &#039;tw_cache_get&#039;, false, $atts );\n\t\tif ( false === $content ) {\n\t\t\t$content = self::get_categories_html( $atts );\n\t\t\t$content = apply_filters( &#039;tw_cache_set&#039;, $content, $atts );\n\t\t}\n\n\t\tself::call_scripts_styles( array(), $atts, $instance );\n\n\t\treturn $content;\n\t}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Code file location<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">testimonials-widget\/testimonials-widget\/includes\/class-testimonials-widget.php<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Testimonials Widget [testimonials_examples] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Testimonials-Widget shortcode is a tool that displays specific testimonials on your website. It utilizes the &#8216;testimonials_examples&#8217; function to parse arguments and apply filters for content customization.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[testimonials_examples]<\/code><\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Examples and Usage<\/h3>\n\n\n<p><strong>Basic example<\/strong> &#8211; Displaying testimonials with the default settings.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[testimonials_examples \/]<\/code><\/pre>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Function Code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In case you have difficulties debugging what causing issues with <code>[testimonials_examples]<\/code> shortcode, check below the related PHP functions code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode line<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_shortcode( 'testimonials_examples', array( __CLASS__, 'testimonials_examples' ) );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode PHP function<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; light: false; title: ; toolbar: true; notranslate\" title=\"\">\nfunction testimonials_examples( $atts = null ) {\n\t\t$atts = wp_parse_args( $atts, self::get_defaults() );\n\n\t\t$atts&#91;&#039;type&#039;] = &#039;testimonials_examples&#039;;\n\n\t\t$content = apply_filters( &#039;tw_cache_get&#039;, false, $atts );\n\t\tif ( false === $content ) {\n\t\t\t$content = self::get_testimonials_examples( $atts );\n\t\t\t$content = apply_filters( &#039;tw_cache_set&#039;, $content, $atts );\n\t\t}\n\n\t\tself::call_scripts_styles( array(), $atts );\n\n\t\treturn $content;\n\t}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Code file location<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">testimonials-widget\/testimonials-widget\/includes\/class-testimonials-widget.php<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Testimonials Widget [testimonials_options] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Testimonials-Widget shortcode is a powerful tool for displaying testimonials. It parses attributes, caches content, and calls necessary scripts\/styles.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[testimonials_options]<\/code><\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Examples and Usage<\/h3>\n\n\n<p><strong>Basic example<\/strong> &#8211; This shortcode displays the default options for the testimonials widget.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[testimonials_options \/]<\/code><\/pre>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Function Code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In case you have difficulties debugging what causing issues with <code>[testimonials_options]<\/code> shortcode, check below the related PHP functions code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode line<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_shortcode( 'testimonials_options', array( __CLASS__, 'testimonials_options' ) );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode PHP function<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; light: false; title: ; toolbar: true; notranslate\" title=\"\">\nfunction testimonials_options( $atts = null ) {\n\t\t$atts = wp_parse_args( $atts, self::get_defaults() );\n\n\t\t$atts&#91;&#039;type&#039;] = &#039;testimonials_options&#039;;\n\n\t\t$content = apply_filters( &#039;tw_cache_get&#039;, false, $atts );\n\t\tif ( false === $content ) {\n\t\t\t$content = self::get_testimonials_options( $atts );\n\t\t\t$content = apply_filters( &#039;tw_cache_set&#039;, $content, $atts );\n\t\t}\n\n\t\tself::call_scripts_styles( array(), $atts );\n\n\t\treturn $content;\n\t}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Code file location<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">testimonials-widget\/testimonials-widget\/includes\/class-testimonials-widget.php<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Testimonials Widget [testimonials_recent] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Testimonials-Widget plugin shortcode is designed to display recent testimonials. It utilizes the &#8216;testimonials_recent&#8217; function to retrieve and validate the settings. \n\n\n\nThe shortcode then sets the type and widget number. If no content is cached, it generates HTML for recent testimonials and applies any filters. Finally, it calls the necessary scripts and styles before returning the content.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[testimonials_recent]<\/code><\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Parameters<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a list of all possible testimonials_recent shortcode parameters and attributes:<\/p>\n\n\n<ul>\n<li><code>$atts<\/code> &#8211; An array of attributes, settings, or options for the recent testimonials widget.<\/li>\n<li><code>$widget_number<\/code> &#8211; Number of the widget instance, used to differentiate multiple instances.<\/li>\n<\/ul>\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Examples and Usage<\/h3>\n\n\n<p><strong>Basic example<\/strong> &#8211; Display the most recent testimonials using the &#8216;testimonials_recent&#8217; shortcode.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[testimonials_recent]<\/code><\/pre>\n\n\n<p><strong>Advanced examples<\/strong><\/p>\n<p>Display the most recent testimonials but limit the number displayed to 5. This is useful when you want to keep your page neat and uncluttered.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[testimonials_recent number=5]<\/code><\/pre>\n\n\n<p>Display the most recent testimonials and include testimonials from a specific category. Replace &#8216;category_name&#8217; with the name of your category. This can help you showcase testimonials from a specific group or product line.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[testimonials_recent category='category_name']<\/code><\/pre>\n\n\n<p>Display the most recent testimonials and order them by the testimonial date, in descending order. This helps in showing the most recent testimonials at the top.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[testimonials_recent orderby='date' order='DESC']<\/code><\/pre>\n\n\n<p>Display the most recent testimonials and exclude testimonials from a specific category. Replace &#8216;category_name&#8217; with the name of your category. This can be useful if you want to exclude certain testimonials from being displayed.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[testimonials_recent exclude_category='category_name']<\/code><\/pre>\n\n\n<p>Please note that these examples are based on the assumption that the &#8216;testimonials_recent&#8217; shortcode accepts these parameters. The actual parameters may vary based on the implementation of the &#8216;testimonials_recent&#8217; function in your WordPress setup.<\/p>\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Function Code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In case you have difficulties debugging what causing issues with <code>[testimonials_recent]<\/code> shortcode, check below the related PHP functions code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode line<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_shortcode( 'testimonials_recent', array( __CLASS__, 'testimonials_recent' ) );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode PHP function<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; light: false; title: ; toolbar: true; notranslate\" title=\"\">\nfunction testimonials_recent( $atts, $widget_number = null ) {\n\t\t$atts = wp_parse_args( $atts, Axl_Testimonials_Widget_Recent_Testimonials_Widget::get_defaults() );\n\t\t$atts = Axl_Testimonials_Widget_Recent_Testimonials_Widget::validate_settings( $atts );\n\n\t\t$atts&#91;&#039;type&#039;] = &#039;testimonials_recent&#039;;\n\n\t\t$instance              = ! empty( $widget_number ) ? $widget_number : self::add_instance();\n\t\t$atts&#91;&#039;widget_number&#039;] = $instance;\n\n\t\t$content = apply_filters( &#039;tw_cache_get&#039;, false, $atts );\n\t\tif ( false === $content ) {\n\t\t\t$content = self::get_recent_html( $atts );\n\t\t\t$content = apply_filters( &#039;tw_cache_set&#039;, $content, $atts );\n\t\t}\n\n\t\tself::call_scripts_styles( array(), $atts, $instance );\n\n\t\treturn $content;\n\t}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Code file location<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">testimonials-widget\/testimonials-widget\/includes\/class-testimonials-widget.php<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Testimonials Widget [testimonials_tag_cloud] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Testimonials-Widget plugin shortcode is a tool that generates a tag cloud of testimonials. It uses the &#8216;testimonials_tag_cloud&#8217; function to parse and validate the settings, create the tag cloud HTML, and apply caching filters.\n\n.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[testimonials_tag_cloud]<\/code><\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Examples and Usage<\/h3>\n\n\n<p><strong>Basic example<\/strong> &#8211; Showcases a basic usage of the testimonial tag cloud shortcode without any additional parameters.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[testimonials_tag_cloud]<\/code><\/pre>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Function Code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In case you have difficulties debugging what causing issues with <code>[testimonials_tag_cloud]<\/code> shortcode, check below the related PHP functions code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode line<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_shortcode( 'testimonials_tag_cloud', array( __CLASS__, 'testimonials_tag_cloud' ) );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode PHP function<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; light: false; title: ; toolbar: true; notranslate\" title=\"\">\nfunction testimonials_tag_cloud( $atts, $widget_number = null ) {\n\t\t$atts = wp_parse_args( $atts, Axl_Testimonials_Widget_Tag_Cloud_Widget::get_defaults() );\n\t\t$atts = Axl_Testimonials_Widget_Tag_Cloud_Widget::validate_settings( $atts );\n\n\t\t$atts&#91;&#039;type&#039;] = &#039;testimonials_tag_cloud&#039;;\n\n\t\t$instance              = ! empty( $widget_number ) ? $widget_number : self::add_instance();\n\t\t$atts&#91;&#039;widget_number&#039;] = $instance;\n\n\t\t$content = apply_filters( &#039;tw_cache_get&#039;, false, $atts );\n\t\tif ( false === $content ) {\n\t\t\t$content = self::get_tag_cloud_html( $atts );\n\t\t\t$content = apply_filters( &#039;tw_cache_set&#039;, $content, $atts );\n\t\t}\n\n\t\tself::call_scripts_styles( array(), $atts, $instance );\n\n\t\treturn $content;\n\t}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Code file location<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">testimonials-widget\/testimonials-widget\/includes\/class-testimonials-widget.php<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now that you&#8217;ve learned how to embed the <strong>Testimonials Widget Plugin shortcodes<\/strong>, understood the parameters, and seen code examples, it&#8217;s easy to use and debug any issue that might cause it to &#8216;not work&#8217;. If you still have difficulties with it, don&#8217;t hesitate to leave a comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Below, you&#8217;ll find a detailed guide on how to add the Testimonials Widget Shortcodes to your WordPress website, including their parameters, examples, and PHP function code. Additionally, we&#8217;ll assist you with common issues that might cause the Testimonials Widget Plugin shortcodes not to show or not to work correctly. Before starting, here is an overview [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"name":"Testimonials Widget","slug":"","version":"4.0.4","author":"<a href=\"https:\/\/www.axelerant.com\/\">Axelerant<\/a>","icons":"https:\/\/ps.w.org\/testimonials-widget\/assets\/icon-128x128.jpeg?rev=997088","plugin_tags":"{\"axelerant\":\"axelerant\",\"client\":\"Client\",\"customer\":\"customer\",\"portfolio\":\"portfolio\",\"quote\":\"quote\"}","author_profile":"https:\/\/profiles.wordpress.org\/j0hnsmith\/","requires":"3.9.2","tested":"5.9.8","requires_php":"false","rating":86,"num_ratings":117,"active_installs":10000,"downloaded":1151084,"last_updated":"2022-05-03 10:18am GMT","added":"2011-08-15","homepage":"http:\/\/wordpress.org\/plugins\/testimonials-widget\/","short_description":"WordPress&#039; most easy fully-featured testimonials widget plugin demonstrates social proof via forms, lists, ratings, shortcodes, sliders, widgets, &hellip;","description":"\"Testimonials Widget is a powerful WordPress plugin that allows you to easily display and manage customer testimonials on your website, enhancing credibility and trust.\"","shortcodes":"[\"testimonialswidgetpremium_form\",\"testimonialswidgetpremium_count\",\"testimonialswidgetpremium_link_list\",\"testimonials\",\"testimonialswidget_widget\",\"testimonials_archives\",\"testimonials_categories\",\"testimonials_examples\",\"testimonials_options\",\"testimonials_recent\",\"testimonials_tag_cloud\"]","footnotes":""},"categories":[1],"tags":[],"class_list":["post-1361","post","type-post","status-publish","format-standard","hentry","category-plugins"],"_links":{"self":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/1361","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/comments?post=1361"}],"version-history":[{"count":1,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/1361\/revisions"}],"predecessor-version":[{"id":1654,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/1361\/revisions\/1654"}],"wp:attachment":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/media?parent=1361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/categories?post=1361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/tags?post=1361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}