-
-
Hello,
I want to leave off the author and date under the post title when displaying a single post. iI do not want to do this for all blog posts, so do not want to do it with the theme options. Would you please advise what I should put in my custom css to accomplish this? I have visual composer enabled for posts.
Thank you for any assistance,
Eileen Callahan
- This topic was modified 6 years, 8 months ago by EileenC2007.
- This topic was modified 6 years, 8 months ago by EileenC2007. Reason: original ticket asked two questions. Changed to ask only one
- This topic was modified 6 years, 8 months ago by EileenC2007.
-
Hello,
So, to be more clear, do you want to keep the author and date in single posts, for some of them and remove them for the others?
You are right, if you use theme options, it will affect all single posts. To change only some of them, you need to use custom css.
Add this code into your custom css box in General Options:.postid-451 .blog-article.standard-style .info { display: none; }
This will remove the author and date for the post with id 451. See this screenshot to understand how to find the id of a post: https://postimg.org/image/ao1cc1ty3/
Repeat this code for each post you want to remove the info’s from.Let us know if this is want you needed.
Best regards!
-
Yes, this is just what I was looking for. Thank you so much!
Eileen
-
Thank you so much for this answer. It works fine.
One further question. I think (based on my self-taught knowledge of css) that I should similarly be able to turn off the author and date for a category of posts (when displayed as single posts) instead of having to create a separate css entry for each one individually by replacing .postid-[#] with .category[name], as in:
.category-services .blog-article.standard-style .info {
display: none;
}However, this is not working. Can you tell me what I am doing wrong?
Thank you kindly,
Eileen
-
Hello,
It’s impossible to do that with css, you can try with Javascript.
You can add this css:
.single-post [id^='post-'].info
but it will get all the posts, this one:
.single-post [id^='post-'][id*="31"] .info
gets only one post.
There is no way to include all the ids you want in the above selection.
The best way with css is this:
.single-post #post-31 .info, .single-post #post-33 .info , ..... [the post ids here]
.Best regards!
- This reply was modified 6 years, 8 months ago by Ruco.
-
You must be logged in to reply to this topic.