• Hi!

    I would like to show the post date only for the ‘nieuws’ category on my website (on both the thumbnail and the post itself). I hid the meta data (date & category title) with these code snippets:

    .post__meta {
    margin: 15px 0 0 0;
    font-size: 0.875em;
    display: none;
    }

    .lsvr-pressville-post-grid__post.has-post-thumbnail .lsvr-pressville-post-grid__post-meta {
    color: #FFF;
    display: none;
    }`

    But I don’t know how to exclude the ‘nieuws’ category from hiding the date (I would like to keep hiding the category name for all posts).

    Hope someone can help!

    • This topic was modified 3 years, 4 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Try

    .category-nieuws .post__meta {
    display: block;
    }
    .category-nieuws .lsvr-pressville-post-grid__post.has-post-thumbnail .lsvr-pressville-post-grid__post-meta {
    display: block;
    }

    Or possible display:inline;

    Thread Starter jessds

    (@jessds)

    This works partially, yay it’s something! Thanks @rossmitchell

    It shows the date for the posts in the ‘nieuws’ category, so thats good.

    However it does not show the date on the thumbnails on the homepage. Any other suggestions?

    • This reply was modified 3 years, 4 months ago by jessds.
    Thread Starter jessds

    (@jessds)

    Oh I see now that the date does show on the thumbnails within a post of the ‘nieuws’ category (https://zichtbaarsportief.nl/nieuws-item-4/) but not on the thumbnails on the homepage (https://zichtbaarsportief.nl/).. hmmm

    – There is a problem with the contrast between the date and background images in the news category.
    – I do not see any thumbnails on the homepage.

    In cases like this I use my web browser’s “browser inspector”, it shows me how the page HTML is made and which CSS classes and id are used everywhere. It also shows me which CSS is being applied. Each browser (Firefox / chrome / edge etc) has its own browser inspector.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Show date only for specific post category’ is closed to new replies.