我以前写过的丰富网页摘要代码MYS-tique 2. 也有通用指令 和主题代码 20 11, 我喜欢 and 论文. Below is updated code for Mystique 3
1. 第一个问题是与作者信息 / hrecipe section
该解决方案:
你需要一个谷歌个人资料. 你的谷歌个人资料必须从某处在页面上链接, 使用rel =“我”, 和你的网站的主域名必须在你的谷歌个人资料链接上市.
I achieved this with the Mystique theme with a series of modifications.
首先, 我加入了代码 yoast (如下所示) 添加到functions.php
function yoast_add_google_profile( $contactmethods ) { // Add Google Profiles $contactmethods['google_profile'] = 'Google Profile URL'; return $contactmethods; } add_filter( 'user_contactmethods', 'yoast_add_google_profile', 10, 1);
第二, I went to my wordpress profile page and filled in the google profile field with a link to my google profile
第三, 我编辑一行author.php, 再次, 基于从yoast信息, 但改变的主题Mystique
<?php if(($app--->author->get('user_url')) && ($app->author->get('user_url')!== 'http://')): ?> <?php _ae('Home page:'); ?> <?php endif; ?>
And add the following
<?php if(($app--->author->get('google_profile')) && ($app->author->get('google_profile')!== 'http://')): ?> <?php _ae('Google Profile:'); ?> <?php endif; ?>
然后我编辑AtomObjectAuthor.php,改变线 213 by adding rel=“author” so it reads as follows
return '<a title="'.$title.' " href="'.$this->getPostsURL().'" rel="author">'.$this->getName().'</a>';
如果正确实施,你应该得到的摘要测试工具,它读取成功消息 验证: 著作权标记是这个页面正确
2. 第二个问题(s) 均与hfeed / hentry section and included the following:
小姐-ING需要的hCard“作者”.
警告,ing: 至少一个字段必须为hCard的设置.
警告,ing: 至少一个字段必须为HatomEntry设置.
警告,ing: 小姐-ING必填字段“入门称号”.
警告,ing: 小姐-ING必填字段“更新”.
警告,ing: 小姐-ING需要的hCard“作者”.
解决方案(s):
使用WordPress的编辑器编辑的single.php
查找代码
<h1 class="title"></h1>
与替换此...
<h1 class="title entry-title"></h1> <h2 class="updated"></h2> <h2 class="vcard"></h2>
最后要注意 - 不要只从本页面复制和粘贴代码, 如因某种原因 (我猜的字符编码) 它不会工作. 从这里复制并粘贴到Windows记事本. 然后从Windows记事本重新复制 (或任何其他基本的纯文本编辑器只) 并粘贴到WordPress的编辑器. 通过记事本打算失去任何隐藏的编码或导致这样的代码被作为纯文本处理的问题被认为是其他数据!
你怎么看? 请给我们一个评论如下! 如果您想订阅,请使用菜单上的订阅链接右上方. 您还可以通过使用下面的链接社会分享这与你的朋友. 干杯.
是否有此更新,因为该代码是这么多的不同,现在使用原子引擎?
I have tried to possibly add the code with the atom calls but I am just a little unsure of how to get this to work properly.
尚未为这个代码仍然有效. 可是, 我会做这一切的更新在不久的将来 - 一旦与网站的迁移相关的问题已经得到解决🙂在3-4周回来检查🙂