Hide post signature in list view

The post signature is visible both in list view and in single view. I’d like to hide the signature in list view. It would be great to have an option in the customize section to hide it.
An alternative solution could be to hide it via CSS. Can I be sure that the signature is always the last paragraph of a post? Or could you please add a class like post-signature to the p-tag of the signature?

Yeah, I’ve wondered if it’d make sense to have this be the default. A few notes:

  • The post signature will be hidden in the list view if you use the excerpt feature in your posts (it’ll be hidden behind the “Read more” link)
  • You can safely assume the post signature will always be the last thing in a post, yes.
  • We can potentially add a class name to the signature section, we just need to make sure it works with multiple paragraphs, too
2 Likes

You can hide it with this Custom JavaScript:

/* Remove Post Signatures on Home Page posts */
if (!document.getElementById("post-body")) {
    var sigs = document.querySelectorAll("#post-signature");
    var i;
    for (i = 0; i < sigs.length; i++) {
      sigs[i].setAttribute("id", "post-signature-homepage-hidden");
    }
}
1 Like

For the time being I added this custom CSS to hide my single paragraph signature:

body#collection article .e-content p:last-child {
    display: none;
}

This works well in the list view of my blog with a mixture of full posts and excerpts. Still an option to disable signatures in list view would be great. Thanks for helping!

@dino I try to avoid JavaScript if a problem can be solved with CSS only.