网站徽标(如果是主页)并发布缩略图(如果是单身).. facebook 和 wordpress
我希望我的 WordPress 网站显示我的网站徽标(如果是主页或自定义页面),否则如果是单个页面,则应在 facebook 上显示帖子缩略图。 通过描述我必须这样做,但在 php 中我不知道我做错了什么 这是描述代码:
<?php
if(is_home||is_page(array('oktato-videok','cikkek','hol-csajozz','hol-randizz','galeria','treningek')))
{
echo "This is the default wordpress descrition";
}
else
{
echo wp_title();
}
?>
如果您可以帮助描述,我可以自己进行足够的更改。
多谢!
I want my wordpress site to show my site logo if is home or a custom page, else if is a single it should show the post thumnnail on facebook.
And with description I have to do it but in php I don't know what did I do wrong
Here's the code of description:
<?php
if(is_home||is_page(array('oktato-videok','cikkek','hol-csajozz','hol-randizz','galeria','treningek')))
{
echo "This is the default wordpress descrition";
}
else
{
echo wp_title();
}
?>
If you could help on the description I can make the sufficient changes on my own.
Thanks a lot!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
is_home
是一个函数,因此应该像is_home()
一样编写。Wordpress Codex 链接:http://codex.wordpress.org/Function_Reference/is_home
is_home
is a function and should therefore be written likeis_home()
.Link to the Wordpress Codex: http://codex.wordpress.org/Function_Reference/is_home