This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

hide “posted on” text

Open 11 replies premiumthemetheme-vantage
11 years ago · Last reply by Greg Priday 11 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.

Need fast email support? Get SiteOrigin Premium

Replies

11
  1. Greg Priday Staff 11 years, 6 months ago

    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. tkanotz 11 years, 6 months ago

    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. tkanotz 11 years, 6 months ago

    Here is what the html looks like from Firebug:

    Posted on

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

  4. Andrew Misplon Staff 11 years, 6 months ago

    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. tkanotz 11 years, 6 months ago

    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. tkanotz 11 years, 6 months ago

    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?

    • Greg Priday Staff 11 years, 6 months ago

      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. Greg Priday Staff 11 years, 6 months ago

    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. tkanotz 11 years, 6 months ago

    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. tkanotz 11 years, 6 months ago

    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.

Have a different question or issue?

Start New Thread