Home>Support>hide “posted on” text

hide “posted on” text

By tkanotz, 10 years ago. Last reply by Greg Priday, 10 years ago.

Hi there,
I’m trying to figure out how to hide the “posted on” text from the post date meta info. I’m using a Vantage Premium child theme, and have looked at the Vantage Premium functions.php and can’t find anything.
Thanks in advance!

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 10 years, 29 days ago Greg Priday
    Hi, I Work Here

    Hi tkanotz

    One very easy way to handle this would be with some custom CSS.

    article.post .entry-header .entry-meta {
       display:none;
    }

    Or you could filter this text using the vantage_posted_on filter.

    function vantage_child_filter_vantage_posted_on($code){
       return '';
    }
    add_filter('vantage_posted_on', 'vantage_child_filter_vantage_posted_on');

    Either of those should do the trick.

  2. 10 years, 27 days ago tkanotz

    Hi Greg,
    Thanks for your response. I’m actually just trying to hide the “posted on” text that shows up before the date. I still want the date and year to show, so using display: none won’t work. I’m sure it’s somewhere in the PHP but I can’t identity which file I need to modify to remove the “posted on” text specifically. Does that make sense? Thx

  3. 10 years, 27 days ago tkanotz

    Here is what the html looks like from Firebug:

    Posted on

    I need to remove the “posted on” text between and

  4. 10 years, 26 days ago Andrew Misplon
    Hi, I Work Here

    Hi tkanotz

    Did you perhaps try Greg’s second solution. You’ need to paste that snippet into a functions.php file within a child theme after the opening

  5. 10 years, 26 days ago tkanotz

    I think that will do the same thing and remove the entire posted on date, where I just want to remove the “posted on” text that comes before the actual date/month/year.

  6. 10 years, 24 days ago tkanotz

    Hi again,
    I actually figured this out. I had to go in to the “template-tags.php” file and that’s where I could remove the “posted on” text. Now I have another issue…I want to abbreviate the month to the 3-letter abbreviations. Any ideas?

    • 10 years, 24 days ago Greg Priday
      Hi, I Work Here

      To start, a bit of a disclaimer. We can only point you in the right direction with these sorts of changes. We can’t actually help you with all the steps involved. We generally say suggest a feature instead of trying to make these changes yourself – https://siteorigin.com/suggest-feature/

      For this, you’ll probably want to copy the vantage_posted_on function to your child theme. You’ll need to edit what’s currently on line 150 of template-tags.php. You’ll need to change that ‘c’ – this accepts a PHP date string – http://php.net/manual/en/function.date.php

  7. 10 years, 24 days ago Greg Priday
    Hi, I Work Here

    If you just want to get rid of the actual Posted On text, then you’d need to make a slight modification to the function I posted.

    function vantage_child_filter_vantage_posted_on($code){
    	return str_replace('Posted on ', '', $code);
    }
    add_filter('vantage_posted_on', 'vantage_child_filter_vantage_posted_on');
  8. 10 years, 23 days ago tkanotz

    Hi Greg,
    Thanks or letting me know about the “suggest a feature”. Will definitely use that down the road. Thanks also for the function modification. I also easily researched how to abbreviate the month so I’m all set there as well. Thx!

  9. 10 years, 23 days ago tkanotz

    One more question on this same subject. I would like to re-arrange the date info and have different CSS for the month, day and year. It seems that they are all lumped together in one style and I can’t determine how to separate them. Would this be a function issue or a php template issue? Thx

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More