Remove Post Meta Details

Note : This snippet applies to Customizr version 3.1.x and below. It may not work with version 3.2+. Use with caution on 3.2+ and check the availability and type of the hooks in the Customizr hooks API.

Last Reviewed: 4-Dec-14 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.* or above.

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:

 

Remove individual Post Meta Details:

 

Now finish off by editing and adding the following code to your child theme functions.php:

 

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.

Remember: you shouldn’t edit the theme’s functions.php.


About Dave Bardell

My name is Dave Bardell (@rdellconsulting) and have been supporting the Forum since discovering this wonderful Theme. Have learnt a lot from other Supporters (@acub, @tomaja, @ElectricFeet, in particular). Have a library of snippets I've built up which in adding here, I'll try to acknowledge the original contributor but apologies to any I miss or wrongly attribute. daveb@rdellconsulting.com


44 thoughts on “Remove Post Meta Details

  • Reply
    afjsystem

    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 ?

    • Reply
      Dave Bardell Post author

      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;}

    • Reply
      afjsystem

      Thanks Dave.. for one word of catname, it works..

      but i have trouble with two words of catname, such indikator forex.

      any advice ?

    • Reply
      afjsystem

      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?

  • Reply
    Iris

    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

  • Reply
    Fabio

    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

  • Reply
    L Savage

    http://www.themesandco.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?

    • Reply
      Dave Bardell Post author

      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

    • Reply
      Janneke

      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

  • Reply
    Lars Erik Almo

    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?

  • Reply
    Marica

    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

    • Reply
      Steven H.

      Yes, you need to display the tag buttons again:

  • Reply
    Chris

    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 “……………….”.

  • Reply
    Scott DeLuzio

    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.

  • Reply
    Sara

    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

  • Reply
    Apostle

    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?

  • Reply
    Brian G Scully

    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

  • Reply
    jinka varalakshmi

    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;
    }

Leave a Comment

Your email address will not be published. Required fields are marked *

Do you need to share some code? To display it in a nice looking syntax highlighter, wrap your code between the following tags (css code in this example) : <pre class="lang:css">YOUR CODE</pre> ( possible code language acronyms : css, php, xhtml, javascript, sql)

You may also use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">