Site logo

Archived topic

Disable / Hide Published Dates on Specific Pages

3 replies · Started by Derek on June 2, 2021

Viewing posts 1–4 of 4

Hi GP Team,

I've looked deep through the forum to find this topic, but haven't come across any threads that seem to resolve this issue.

I need to disable or otherwise hide the published date on a few specific pages.

I found this CSS in another thread and it sort of works, but there is a conflict:

.single.pageid-xxx .entry-meta,
{
    display: none;
}

I have implemented the additional CSS from here - https://docs.generatepress.com/article/show-the-updated-post-date/ - on my website. Which works great.

However, when I try to hide the date using the above CSS it only hides the "Updated by" portion of the entry-meta, leaving the date and author.

If I can just leave only "By [author name]" from the entry-meta on these pages that would be ideal. However, if I needed to just remove the entire entry-meta to make it work, including the author, that's fine also.

Thanks in advance for your help

Hi there,

Try this CSS:

body.page-id-25531 .entry-meta .posted-on {
    display: none;
}

If you need to expand it to multiple pages then this should work:

body.page-id-25531 .entry-meta .posted-on,
body.page-id-xxxx .entry-meta .posted-on,
body.page-id-xxxx .entry-meta .posted-on {
    display: none;
}

Make sure to clear and disable your caching plugin if you need further help with this.

Let me know :)

That worked perfect. Thanks very much!

No problem :)

This archived topic is closed to new replies.