a itemprop=url href=php $this-permalink php $this-title a 删除permalink 函数返回内容内的指定字符
要删除permalink函数返回内容内的指定字符,您可以使用PHP的str_replace函数。以下是一个示例代码:
<a itemprop="url" href="<?php echo str_replace('指定字符', '', $this->permalink()) ?>"><?php $this->title() ?></a>
在上面的代码中,将“指定字符”替换为您要删除的实际字符。str_replace函数将在permalink函数返回的字符串中查找并删除指定字符。然后,将结果作为链接的href属性值传递给标签。
原文地址: https://www.cveoy.top/t/topic/iVMN 著作权归作者所有。请勿转载和采集!