Php 如何在wordpress测试插件中添加div?

Php 如何在wordpress测试插件中添加div?,php,wordpress,Php,Wordpress,我将此插件用于推荐,我想添加我的自定义div foreach推荐。我发现此插件用于编辑插件视图,但是我仍然不明白它是如何工作的。那么我该如何添加它呢?在你的主题函数中。php添加下面的代码,并用你的图像url更改图像urlhttp://www.subway.com/core/images/topNavBar/subway-logo.png 代码 add_filter( 'testimonials_widget_testimonial_html', 'my_testimonials_widget

我将此插件用于推荐,我想添加我的自定义div foreach推荐。我发现此插件用于编辑插件视图,但是我仍然不明白它是如何工作的。那么我该如何添加它呢?

在你的主题
函数中。php
添加下面的代码,并用你的图像url
更改图像
url
http://www.subway.com/core/images/topNavBar/subway-logo.png

代码

 add_filter( 'testimonials_widget_testimonial_html', 'my_testimonials_widget_testimonial_html', 10, 5 );

function my_testimonials_widget_testimonial_html( $content, $testimonial, $atts, $is_list = true, $is_first = false, $widget_number = null ) {

    echo'<div class="my-image"><img width="98%" class="custom-image" src="http://www.subway.com/core/images/topNavBar/subway-logo.png" alt="" /></div>';


    return $content;
}
add_filter('commentials_widget_commentials_html','my_commentials_widget_commentials_html',10,5);
函数my_Certificationals_widget_Certificationals_html($content,$Certificationals,$atts,$is_list=true,$is_first=false,$widget_number=null){
回声';
返回$content;
}

在哪里添加div?您可以筛选该功能例如,我想将每个证言的徽章添加到证言块的内部。我如何筛选它?您能给我写一个示例吗?好的,我会尝试这样做的好的,它将在哪里显示。。。在slider或最近的推荐中?我在testicials.php文件中使用这个函数testicials(),它是wordpress中创建的推荐页面的模板。它不是一个滑块。