How to turn off post author and/or post date?

Is it possible to somehow turn off showing the post author and/or date?

Hi there

yes, its possible by custom CSS, please provide direct link to the page/post and I will generate it for you

Regards

Well, as of now I’m interested in hiding the author part. Including the “by”. (Which BTW is not translated to Polish - how to I provide a fix for missing translations?)

It shows both on the category page:
Świadectwa – Lumen Vitae (lumen-vitae.online)
and on the post page:
Świadectwo Magdaleny – Lumen Vitae (lumen-vitae.online)

Hi @AdamBadura

You can use these custom CSS codes:

span.posted-on {
    visibility: visible;
}
.entry-meta {
    visibility: hidden;
}

Thanks!

However, it seems to me that the below CSS is slightly better:

.entry-meta {
    visibility: hidden;
}
.entry-meta .posted-on {
    visibility: visible;
}
.entry-meta .author {
    display: none;
}

My rework of your CSS has the advantage of better centering of the text. Since your code only hides the author part, the part still contributes its width and in effect, the date part looks oddly offset from being in the center. I have solved this by instead using display: none;.

This is still imperfect since the “by” text is not within <span> (unlike the “Opublikowany” - or “Published” as I presume is in the English version). Hence, it is hidden only. But this is small enough to hope no one will notice.

Are there any changes the “by” text will get under the <span>? And translated also?

Should I use span.posted-on as you did or just .posted-on? What is the advantage of being extra exact here?

Should I enter this code in the “Custom CSS” section of theme settings? Or should I make a child theme and add it there instead?

Hm… Upon further investigation, my CSS seems to look better when in the theme manipulation mode. Once I’m looking at the page normally, the line again gets bigger offset and looks worse…

Hm… Upon further investigation, my CSS seems to look better when in the theme manipulation mode. Once I’m looking at the page normally, the line again gets bigger offset and looks worse…

I got it! It is the “Edit” link. It doesn’t show in the theme settings mode, but it did show when I opened the page while being logged in. To cover for that we should also add

.entry-meta .edit-link {
    visibility: visible;
}

(or use display: none;)

This is still imperfect since the “by” text is not within <span> (unlike the “Opublikowany” - or “Published” as I presume is in the English version). Hence, it is hidden only. But this is small enough to hope no one will notice.

Well, with the “Edit” link shown the above problem is somewhat more visible by an unusually large offset between the date text and the edit link.

Hi Adam

I see it’s normal now, … is it ok for you? :slight_smile:

OK, let me sum up. I think the following CSS might be better than what you proposed:

.entry-meta {
    visibility: hidden;
}
.entry-meta .posted-on {
    visibility: visible;
}
.entry-meta .author {
    display: none;
}
.entry-meta .edit-link {
    visibility: visible;
}

(I’m providing it in case anyone else would have a similar issue.)

However, I still have some doubts:

  1. Should I be adding this as extra CSS for the theme in theme settings? Or should I make a child theme and add it there? (Where exactly?) What is better from WordPress point of view?
  2. Your CSS used span for .posted-on. Should I do similarly with my CSS? Is it better to be explicit about the element type? If so, why haven’t you done so with .entry-meta?

I also have some follow-up questions:

  1. Is it likely the theme will be fixed regarding the “by” text there that a) is not translated and b) is not part of the .author <span> and hence cannot be easily hidden (in terms of display: none)?
  2. Is it likely the theme will be improved to make all these configuration options? Having text on the page that is later hidden with CSS seems questionable to me (even if it may in general have some pros as well).

Hi

  1. no need css just for this code, add it in the Appearance > Customize > Additioanll CSS

  2. Not really necessary, if your code is working for you then use it :slight_smile:

  3. @AdamBadura I hope it will be fired in the future updates,

  4. @AdamBadura these are very minor things, they can be fixed but I’m not sure when exactly the developer will include fixes for them.

Regards

1 Like