wordpress - 在 Wordpress 中删除 get_permalink
问题描述
我正在我的网站上工作,我想删除小部件中的页面链接,以便显示标题和内容,但无法访问页面。有人可以帮忙吗?谢谢你。
<?php
echo '<a href="'.esc_url(get_permalink()).'" class="all-link">';
the_title();
echo '</a>';
?>
解决方案
好吧,只需擦除a
标签及其所有属性,而且您不需要echo
for the_title(); or
the_content()` ,因为这些 WP 函数已经回显了这些:
<?php
the_title();
?>
推荐阅读
- javascript - 在后台更新查询表
- typescript - 如何根据离子4中的时间戳从firestore订购查询
- r - Conda:从 github 安装 R 包
- spring - int 类型的方法参数缺少 URI 模板变量“idFamille”
- windows - 创建类似于 Windows 7 小工具的 Windows 应用程序
- windows - 使用 WinSCP 脚本自动从本地机器到远程机器的文件传输活动
- ios - @IBOutlet View 在 viewDidDisappear 上为零
- android - 关闭应用程序时 Flutter FCM 不起作用
- java - Spring @Valid 和 @Validated 不能一起工作
- apache-spark - 是一种使用复杂类型作为 spark ml 转换器的输入列的方法