【问题标题】:Hide Blog Post Author on Wordpress Theme (The Fox)隐藏关于 Wordpress 主题的博客文章作者(The Fox)
【发布时间】:2017-01-12 16:58:34
【问题描述】:

在帖子存档页面here

以及单独的帖子页面,例如this

我想隐藏作者,目前显示“by coadmin”,但我没有尝试使用任何插件,也找不到任何专门提到作者的 CSS 行。我可以通过定位 .post-info {display: none} 来隐藏所有信息,但我只想隐藏作者。

如果我针对作者姓名的特定 div,我可以隐藏它,例如:

#rd_tebhz4xe9fvnw90a41ec > div:nth-child(1) > div > div.post-info > a:nth-child(1) {
display: none;}

但是“by”仍然存在。

有人有什么建议吗? Wordpress 主题名为“The Fox”。

【问题讨论】:

    标签: css themes blogs author


    【解决方案1】:

    您可以使用以下 CSS:

    这隐藏了作者。

    .post .post-info a[rel="author"] {
        display: none;
    }
    

    这会将剩余的文本向左移动并隐藏“By |”。

    .post .post-info {
        overflow: hidden;
        text-indent: -3em;
    }
    

    【讨论】:

      【解决方案2】:

      您最好的办法是更改 php 文件以使其不呈现。 但是,如果您绝对必须只使用 css,则以下内容非常 hacky,但应该可以解决问题:

      .post-info{
        margin-left: -40px !important;
      }
      .post-info a[rel="author"]{
        display: none !important;
      }
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2019-02-24
        • 1970-01-01
        • 2017-03-28
        • 1970-01-01
        • 2017-09-26
        • 2015-10-05
        • 2020-05-02
        • 1970-01-01
        相关资源
        最近更新 更多