【问题标题】:How do you add a link title to the post meta tag code?如何在帖子元标记代码中添加链接标题?
【发布时间】:2013-05-30 15:57:09
【问题描述】:

我的代码是if ($link->getAttribute('title') == '' || empty($link->getAttribute('title'))),我想知道如何在标签位于帖子底部时显示链接标题。

我最近尝试了https://wordpress.stackexchange.com/questions/19292/automatically-add-title-attribute-to-links-in-wordpress,但它在if ($link->getAttribute('title') == '' || empty($link->getAttribute('title')))线上坏了

这是我的来源中显示的内容:Tags: <a href="http://revivemediaservices.com/tag/destin-web-design/" rel="tag">Web Design</a>

【问题讨论】:

    标签: wordpress metadata title


    【解决方案1】:

    我认为问题在于您的代码正在编码 HTML 实体,在这种情况下您不希望这样做。为此,您可以获取其背后的代码,而不是网页设计。

    您需要提供这些链接在哪一行回显/打印。我预计在那里使用html-entitites() 函数。 html-entitites 函数在这里是必要的,但只需要对这个粗体部分进行编码:<a hreft='http://example.com>示例描述</a>,所以你的代码必须修改 IMO。

    【讨论】:

      猜你喜欢
      • 2020-04-10
      • 2017-06-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-20
      • 1970-01-01
      相关资源
      最近更新 更多