a itemprop=url href=php $this-permalink php $this-title a 将permalink 返回内容中的 indexphp删除
要将permalink返回内容中的 /index.php删除,您可以使用PHP的str_replace函数将字符串中的/index.php替换为空字符串。下面是示例代码:
<a itemprop="url" href="<?php echo str_replace('/index.php', '', $this->permalink()) ?>"><?php $this->title() ?></a>
这将在生成的链接中删除/index.php部分。请确保将代码放置在正确的位置,并根据需要进行适当的调整。
原文地址: https://www.cveoy.top/t/topic/iVMR 著作权归作者所有。请勿转载和采集!