在我的主题中,有一个快捷码标记来显示帖子的标记,还有加载帖子内容的功能。但in函数不包括shortcode标记。现在我想把它添加到函数中,但我不知道怎么做。希望大家都能帮助我。提前感谢。
Shortcode tag
function wwl_post_tags( $atts ) {
if( $tags = get_the_tag_list( \'\', \', \' ) ) {
$defaults = array(
\'before\' => __( \'Từ khóa: \', \'icy\' ),
\'after\' => \'. \',
);
$atts = shortcode_atts( $defaults, $atts );
return sprintf( \'%1$s<span class="entry-tags">%2$s</span>%3$s\',
$atts[\'before\'],
$tags,
$atts[\'after\']
);
}
}
add_shortcode( \'post_tags\', \'wwl_post_tags\' );
Function to load content post
function wwl_post_content() {
global $more;
if ( ! is_single() ) {
$more = 0;
}
do_action( \'wwl_before_post_content\' ); // Hook
if ( ! is_single() && of_get_option(\'post_content\') == 2 || is_search() ) :
?>
<div class="entry-summary">
<?php wwl_thumbnail(); ?>
<?php the_excerpt(); ?>
<div class="clearfix"></div>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php wwl_thumbnail(); ?>
<?php the_content( \'\', false, \'\' ); ?>
<?php wp_link_pages( array( \'before\' => \'<div class="page-links">\' . __( \'Pages:\', \'icy\' ), \'after\' => \'</div>\' ) ); ?>
<div class="clearfix"></div>
</div><!-- .entry-content -->
<?php endif;
}