如何在php小部件代码中定义模板目录(以便在“images”文件夹中引用和映射)?
// WIDGET CODE GOES HERE
query_posts(\'posts_per_page=1&post_type=testimonial&orderby=rand\');
if (have_posts()) :
echo "<div class=\\"testimonial-widget group\\">";
while (have_posts()) : the_post();
the_post_thumbnail(\'widget-test-thumb\');
echo "<p><span class=\\"left\\">\\"</span>";
$excerpt = get_the_excerpt();
// IMAGE WOULD GO HERE
echo string_limit_words($excerpt,15);
echo "<span class=\\"right\\">\\"</span></p>";
echo "<h2>".get_the_title()."</h2>";
endwhile;
echo "</div>";
endif;
wp_reset_query();