Hy how can i remove the created on date in some posts, not in the hole website? Thank you.
Hi @dani_blues,
Here are some steps to achieve that:
First, get the IDs of the post you want the created on date
removed. Here’s a link that should help you find the post IDs. https://www.ostraining.com/blog/wordpress/how-to-find-the-page-id-in-wordpress/
Second, add the css below to X/PRO > THEME OPTIONS > CSS
. But before adding it, you need to update the the number on .post-212
to your post ID. In the example below the IDs I want to hide is 212 and 213.
.post-212 p.p-meta span:nth-child(2) {
display: none;
}
.post-213 p.p-meta span:nth-child(2) {
display: none;
}
Hope it helps.
Hy, I found the Post-ID, but it doesn´t work. sorry.
Hi @dani_blues,
There are possible reason a custom CSS might not work. It can be CSS syntax error. If not, you might be seeing a cache version of the page. To check the root cause it would be better if you can share the actual page where you expect this code to work. This will lessen the back and forth and we will be more direct on our recommendation. Thank you.
Hy there is the page.
Hi @dani_blues,
Please kindly change the code to:
.postid-291 p.p-meta .entry-date {
display: none;
}
The way that I come up with the code was to use the Google Developer Toolbar to see the HTML code and find the proper CSS selector:
I found out that the ID of the post is printed in the HTML body tag, class attribute like this: postid-291
And I checked the date section to find out the correct selector for the date section using the Chrome Developer Toolbar. So the result of the selector was: .postid-291 p.p-meta .entry-date
Then I simply added the display: none;
section to hide that section. You can learn more about the CSS basics here:
Thank you.
Sorry but this dont work.
Hey @dani_blues,
I tested the code using the Chrome’s developer tool and it works fine. Make sure to clear all caches including your browser’s cache after adding the code.
.postid-291 p.p-meta .entry-date {
display: none;
}
If you’re still unable to make the above code work then try adding it in your child theme’s style.css file. If nothing works then get back to us with the URL/User/Pass of your WordPress dashboard using the Secure Note functionality of the post to follow up the case.
Thanks!
Hy, it works, and i tell you why.
AlbrechtX said, i should instert the code to "X/PRO > THEME OPTIONS > CSS
That is the global CSS. If i add the code there, nothing happens.
I open a page, then i click on costumizer and then I added the code now in the additional css.
Now it works.Thank you for your help
Hey @dani_blues,
You are most welcome.
We are just glad that you have figured out a way to correct the said issue.
Best Regards.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.