我有一个简码[wc-ps]
。我必须将其放在搜索结果页面中,但它不起作用。
$post_title = esc_html( $post->post_title );
$post_title = self::text_replace( $post_title );
$output .= '<div class="smart-search-post-title">' . $post_title . '</div>';
$output .= '<div class="smart-search-post-subtitle">' . do_shortcode('[wc_ps]') . '</div>';
$post_title
是产品的标题。 div有do_shortcode('[wc_ps]')
。我确实喜欢这个,但是没有显示。我该怎么办?
$post_title = esc_html( $post->post_title );
$post_title = self::text_replace( $post_title );
$output = "";
$output .= '<div class="smart-search-post-title">' . $post_title . '</div>';
$output .= '<div class="smart-search-post-subtitle">' . do_shortcode('[wc_ps]') . '</div>';