请帮忙修改一下wordpress中的代码

兄弟们帮帮忙~ 我想把这短代码改成不返回文字应该怎么样修改呢?以下是函数代码:add_filter(✀the_excerpt✀, ✀wallpress_strip_tags✀);add_filter(✀the_content✀, ✀wallpress_strip_tags✀);if( !function_exists(✀wallpress_strip_tags✀) ) :function wallpress_strip_tags($text) { if( !is_single() & !is_page() ) { $text = preg_replace( array( // Remove invisible content ✀@<iframe[^>]*?>.*?</iframe>@siu✀, ✀@<embed[^>]*?>.*?</embed>@siu✀, ✀@<br.*?>@siu✀ ), array( ✀ ✀, ✀ ✀), $text ); } return $text;}endif;修改这个主要是为了首页只显示文章的缩略图而不显示文章内容。下面的是显示代码<div class="item-content"> <?php if ( is_search() ) : ?> <?php the_excerpt(); ?> <?php else : ?> <?php the_content(✀✀); ?> <?php wp_link_pages( array( ✀before✀ => ✀<div class="item-link-pages"><span> ✀ . __( ✀Pages:✀, ✀wallpress✀ ) . ✀</span>✀, ✀after✀ => ✀</div>✀ ) ); ?> <?php endif; ?></div>求指点~
2026年09月18日 14:22
有1个网友回答
网友(1):


就调用文章的缩略图!!