如何从the_excerpt()中删除发布日期和作者姓名

时间:2013-12-25 07:00:28

标签: php facebook wordpress

在我的网站上有一个用于分享帖子的社交按钮。它工作正常但我不想在分享facebook的内容时发布日期和作者姓名..见图像 enter image description here

正如您在红线标记的图像中看到的那样。

分享我正在使用它..

<!-- for Facebook -->          
                <meta property="og:title" content="<?php the_title(); ?>" />
                <meta property="og:type" content="article" />
                <meta property="og:image" content="<?php echo($thumb_url); ?>" />

                <meta property="og:description" content="<?php the_excerpt(); ?>" />

我正在使用the_excerpt()的内容,但我不希望在内容中包含日期和作者姓名。

我能做些什么...... 提前谢谢......

1 个答案:

答案 0 :(得分:1)

有两种方法可以做到这一点

  1. 你可以使用快速修复程序用css隐藏它,添加到style.css的末尾:

    .grid .post .post-meta {display:none; }

  2. 从缩略图中删除post-meta div。

  3. 由于

相关问题