Remove date and author in a special categorie

  • Author
    Posts
  • #134837

    evswebpage
    Member

    Hi Thomas,
    I would like to remove date and author from my blog posts, but only in one special category. Is that possible with your theme?
    I inserted already the CSS-Snippet (.postmeta .meta-date, .postmeta .meta-author {
    display: none;}), but this is not, what I intended. I need the date in my news categories, but not in other categories of my page.
    Thank you so much for your help!
    Kerstin

    The blog I need help with is europeanvaluesstudy.wordpress.com.

    #134865

    themezee
    Theme Author

    Hi Kerstin,

    You can hide the postmeta of a specific category with this short CSS snippet:

    .category-{category-slug} .postmeta {
        display: none;
    }

    You have to replace the category-slug with the actual category.

    For example:

    .category-events .postmeta {
        display: none;
    }

    or

    .category-dissemination .postmeta {
        display: none;
    }

    As alternative, you could also hide the postmeta on all category pages and then add it back to the news category only. That is a faster way if you have multiple categories which should not display the postmeta.

    .category .postmeta {
        display: none;
    }
    .category-news .postmeta {
        display: block;
    }
    

    Best,
    Thomas

    #134932

    evswebpage
    Member

    Hi Thomas,
    Thank you very much. It works perfectly! (I decided to take the second option)

    All the best,
    Kerstin

The topic ‘Remove date and author in a special categorie’ is closed to new replies.