azamatx
Forum Replies Created
-
This text is added by plugins/themes downloaded from dl-wordpress.com. The website host plugins with injected and encoded code with this ad.
To find this code parts: just search the text
sorry_function
in all your plugins or themes and remove the part of code.Or you can ask for support to fix your website at https://stylemix.net.
Forum: Plugins
In reply to: [Visual Composer] Testimonial CategoriesHi,
First of all you need to create child theme and switch to it in order to prevent further theme updates from overwriting your customizations.
In the child theme’s
function.php
add the following code:add_action( 'init', 'bbchild_init' ); function bbchild_init() { if ( function_exists( 'vc_add_param' ) ) { $testimonial_categories_array = get_terms( 'testimonial_category' ); $testimonial_categories = array( __( 'All', 'bestbuild' ) => 'all' ); if( $testimonial_categories_array && ! is_wp_error( $testimonial_categories_array ) ){ foreach( $testimonial_categories_array as $cat ){ $testimonial_categories[$cat->name] = $cat->slug; } } // Adding Category parameter to the VC module vc_add_param( 'stm_testimonials', array( 'type' => 'dropdown', 'heading' => __('Category', 'bestbuild'), 'param_name' => 'category', 'value' => $testimonial_categories ) ); } }
Check the backend to ensure our new field appears in testimonials module.
Then copy template
vc_templates/stm_testimonials.php
from original theme to the child theme directory and do the following modifications (new lines highlighted with +++):extract( shortcode_atts( array( 'css' => '', 'count' => 1, 'category' => 'all' // +++ ), $atts ) ); // ... if( $category != 'all' ){ // +++ $args['testimonial_category'] = $category; // +++ } // +++ $testimonials = new WP_Query( $args );
Check your module on the frontend. Testimonials should be filtered by selected category.
Hope it helps, if no, please send your request to https://stylemix-wp-support.com/request-a-quote/
Regards,
Azamat
Stylemix WP Support