Customizr introduced built-in feature changes in v3.3.
For more details, read the Documentation
This Snippet is preserved for Users of 3.1/3.2
If you need to remove any or all of the items around a Post (Category, Date, Author), this can be partially achieved with CSS.
To remove the extra text “This entry was posted in”, “on”, “by” & “.”, a new filter needs to be added to the functions.php.
Needs Customizr 3.1/3.2.
Where to copy/paste this code?
The simplest way is to use the Custom CSS section of the customizer option screen. If you have many customizations to make in CSS and PHP, then we strongly recommend you create a child theme. Everything you need to know about creating a child theme with Customizr here.
Remove ALL the Post Meta Details:
/* START OF Remove Post Meta Details */ /* Remove entire Post Notice */ .entry-meta { display: none; } /* END OF Remove Post Meta Details */
Remove individual Post Meta Details:
/* START OF Remove Post Meta Details */ /* Remove Post Category */ .entry-meta .btn { display: none; } /* Remove Post Tag */ .btn-tag { display: none; } /* Remove Post Date */ .entry-date { display: none; } /* Remove Post Author */ .entry-meta .url.fn.n { display: none; } /* END OF Remove Post Meta Details */
Now finish off by editing and adding the following code to your child theme functions.php:
// START OF Remove Post Meta Details //Change meta text add_filter('tc_meta_utility_text', 'rdc_meta_utility_text', 15); function rdc_meta_utility_text($output) { // CHANGE TO DEFAULT TEXT IF NON-ENGLISH LANGUAGE $oldentry1 = 'This entry '; $oldposted1 = 'was posted in '; $oldposted2 = 'was posted on '; $oldtagged1 = 'and tagged '; $olddate1 = 'on '; $oldby1 = 'by '; $oldfullstop = '.'; // CHANGE TO DEFAULT TEXT IF NON-ENGLISH LANGUAGE // Edit this wording to your needs, to remove completely use '' $newentry1 = 'This entry '; $newposted1 = 'was posted in '; // Category $newposted2 = 'was posted on '; $newtagged1 = 'and tagged '; // Tag $newdate1 = 'on '; // Date $newby1 = 'by '; // Author $newfullstop = '.'; // Edit above wording only return str_replace(array( $oldentry1, $oldposted1, $oldposted2, $oldtagged1, $olddate1, $oldby1, $oldfullstop ), array( $newentry1, $newposted1, $newposted2, $newtagged1, $newdate1, $newby1, $newfullstop ), $output); } // END OF Remove Post Meta Details
Where to copy/paste this code?
We strongly recommend you create a child theme and add this to the Child Theme functions.php.
Download a start-up child theme here.
52 thoughts on “Remove Post Meta Details”
Hi. This did not work at all for me. I inserted the respective codes into my child theme css and functions.php and now the actual text of the functions.php code shows up at the top of the page when I go to Child Theme Options in the CMS. I have other code in the functions.php for adding a header image and that part still works. Do I need to add <?php or anything before and after?
how to move all “post metas” under each posts?
Hi, this snippet might help : http://presscustomizr.com/snippet/moving-single-post-metas-to-the-bottom-of-the-post/
Thanks Dave,
I stumbled in a interesting and very particular situation with your snippet.
I don’t want to show the text “on ” for the date therefore I have a line like this:
$newdate1 = 'on '; // Date
The only problem is that also the text of the categories that are ending with “on” are cut of [e.g. a category Election becomes Electi]
There is probably a better way to solve it but this is how how if fix it for now.
I’ve inserted an empty space before the ” on” at this line:
$olddate1 = ' on';
Cheers
my mistake in the first line, I meant:
$newdate1 = ' '; // Date
Hi, could someone help me remove the date, tags and author under each post title – preferably without playing around with codes please!
hello Dave this code does not work anymore
Sir I have placed this code in my style.css file. Category and tags are removed but date is not removed. I want to display only author name below title. Please tell me the solution.
/* Remove Post Category */
.entry-meta .btn {
display: none;
}
/* Remove Post Tag */
.btn-tag {
display: none;
}
/* Remove Post Date */
.entry-date {
display: none;
}
Hi! Fantastic Theme… Is it possible to completely remove the “zoom effect” from the abbreviated blog postings on the blog page? I have searched high and low and cannot find an answer. I have managed to change the image from a Circle to a Square but the “Zoom” remains… Thank you Brian
Hi Brian, you might find the solution here: http://www.presscustomizr.com/snippet/disable-the-reveal-hover-effect-on-images-in-customizr/
Use just the “article.hover .round-div” selector.
Hope this helps
The codes from – “Remove individual Post Meta Details” and “Now finish off by editing and adding the following code to your child theme functions.php” worked nicely for me. However I would like to have the Author’s name showing Can anyone help me on this?
Remove lines 16-19 from your code as that suppresses Author.
Hi Dave,
I’m having the same issue of Chris: after pasting the code to the child theme functions.php, it removes all of the meta detail & text and replaces it with “……………….”.
I’ve tried to find an answer through forum posts but actually couldn’t find anything about that. Any suggestion?
thank you very much for helping!
Sara
Sorry I cannot paste my site url: it’s not online yet.
Hi,
+1 on the problem with this function replaces meta details with “………………………..”
Same as Chris and Sara
Any solution appreciated
Solution found – see;
http://wordpress.org/support/topic/removing-author-information-in-posts
Thanks for sharing Dmac!
Not a fan of that solution I’m afraid. Moving large chunks of core files into the child theme is not a great solution.
a) I’ve changed the snippet to use str_replace instead of preg_replace.
b) Read this new documentation from @ElectricFeet for explanation on Hooks, Actions and Filters.
working fine for me too!
many thanks! 🙂
See new reply to DMac. Hope this correction to snippet works for you.
Dave, new snippet works as expected.
Many thanks for the update and explanation.
I stumbled across this article, while trying to remove the post meta from the “downloads” page while using the Easy Digital Downloads plugin. For example, I wanted the post meta details on my blog posts, but didn’t want “This entry posted by…” on a product page.
I just added
to my child theme’s style.css and it worked perfectly.
Figured I’d post this tip here in case anyone else was trying to do the same.
Well that’s very kind of you Scott. It will surely help!
Thanks and enjoy the theme
In the style.css I’ve put the following codes in “Post and Pages” section (mine was 9.1)
And with this it all dissappeared, without any other hustle.
Hi Dave.
I followed your instructions to Remove individual Post Meta Details and that properly removed the category and author.
But when I add the code to the child theme functions.php, it removes all of the meta detail & text and replaces it with “……………….”.
Hi Chris, I’d suggest the Forum would be a better place to get a solution for this, with a much wider audience to help fix problems. And please include a link to your Site.
See new reply to DMac. Hope this correction to snippet works for you.
Hello,
first of all thanks for having posted this.
I wanted to remove only the category, keeping the tag, but if I use
/* Remove Post Category */
.entry-meta .btn {
display: none;
}
it will remove the tag as well.
what am i doing wrong?
thanks
Sorry Marica. I’d suggest the Forum would be a better place to get a solution for this, with a much wider audience to help fix problems. And please include a link to your Site.
Yes, you need to display the tag buttons again:
hmm, I doesnt get it to work. When I copy code to child function php, I only get a lot of …………………………. in my tag line.
My page is not English but Norwegian. What am I missing?
Sorry Lars. I’d suggest the Forum would be a better place to get a solution for this, with a much wider audience to help fix problems. And please include a link to your Site.
Hi, do I have to change the English text in the //DO NOT CHANGE area to my WP language (DUTCH) to function OK?
Great question to an Englishman who forgets that other people aren’t English 😉
Have checked another Dutch site, and yes, you are absolutely correct. I’ll add a note to the Snippet
Hi Eelco,
I want to remove the entire post notice. But with the explanation (including the css part) above it doesn’t work. As I’m from the Netherlands too, I’m wondering if you could send me the part in functions.php you wrote. Mine is:
//Change meta text
add_filter(‘tc_meta_utility_text’, ‘rdc_meta_utility_text’);
function rdc_meta_utility_text($output) {
// CHANGE TO DEFAULT TEXT IF NON-ENGLISH LANGUAGE
$oldentry1 = ‘Dit item ‘;
$oldposted1 = ‘is gepost in ‘;
$oldposted2 = ‘is gepost op ‘;
$oldtagged1 = ‘en getagt ‘;
$olddate1 = ‘op ‘;
$oldby1 = ‘door ‘;
$oldfullstop = ‘.’;
// CHANGE TO DEFAULT TEXT IF NON-ENGLISH LANGUAGE
// Edit this wording to your needs, to remove completely use ”
$newentry1 = ‘Dit item ‘;
$newposted1 = ‘is gepost in ‘; // Category
$newposted2 = ‘is gepost op ‘;
$newtagged1 = ‘en getagt ‘; // Tag
$newdate1 = ‘op ‘; // Date
$newby1 = ‘door ‘; // Author
$newfullstop = ‘.’;
// Edit above wording only
return str_replace(array(
$oldentry1, $oldposted1, $oldposted2, $oldtagged1, $olddate1, $oldby1, $oldfullstop
), array(
$newentry1, $newposted1, $newposted2, $newtagged1, $newdate1, $newby1, $newfullstop
), $output);
}
Thanks a lot!
Janneke
http://www.presscustomizr.com/snippet/remove-post-meta-details/
On this page it has everything you’d assume one would want on the category post pages…..
However, I’m building a government transparency website and I need to remove the text (excerpt or full) completely from these pages..
I’ve looked for hours for a place to alter or set value to zero — but no luck.
Also was reading a thread where you mentioned you’d put up snippet that puts the slider into these category pages too.. Is it ready?
Hi L. Savage, I understand you only want to display the post titles then?
Did you try to make a search in the forum. See how to make a research in the Customizr user’s forum
You might find all answers to those questions! If not then post a new thread in the Customizr user’s forum and we’ll do our best to help.
Thanks
Hello,
I have managed to remove the post meta details but although I have followed you instructions and used ” in the php file It will not remove the text. Any suggestions?
thanks
Did it not work with single-quotes (‘)?
Thanks for the prompt response Dave. I have actually figured it out, the problem was that since my site is in Italian I had to adjust the first part of the php script to match the wording in Italian.
Thanks Fabio. Saw the light when Eelco raised the same issue below. I’ve corrected the Snippet.
Hello,
first of all thanks for having posted this.
I wanted to remove only the category, keeping the tag, but if I use
/* Remove Post Category */
.entry-meta .btn {
display: none;
}
it will remove the tag as well.
what am i doing wrong?
thanks
Sorry, it was solved by changing some other problem I had. Thanks Dave!
hi,
tried to use the above mentioned codes in order to get rid of my post-42 above the footer of my homepage, but can’t get it solved. Anyone who can help me?
thx
I have updated the Snippet to improve handling of Post Meta editing.
Let me know if I missed something.
Needs Customizr 3.1.* or above
No luck with extended snippet changing the utility text.
i change $olddate1 =’|on |’ ; with this $newdate1 =’- ‘ ; or only emptyspace. it’s not change anything.
it’s cache matters?
Hi Dave, how are you ?
i intend to remove meta entry-date for certain categories.
some categories is not time bound and few are time bound.
how can i do that ?
Every Category within a post can be targeted with the class
.category-(catname)
so you would need to target using something like.category-catname .entry-date {display:none;}
Thanks Dave.. for one word of catname, it works..
but i have trouble with two words of catname, such indikator forex.
any advice ?
Thank you very much!
Respect!
Thank you, thank you, thank you!
It worked well!
And it was real easy with your help!
and what about if I want to add this meta on each post in front page.. how can i achieve it ..
what codes should i write to do this?