How to remove "posted" and "posted in"?

I would like to remove the words “posted” and “posted in” on the blog page and on individual post pages on my sites…without removing the calendar or folder icons. I can find code for adjusting the text, but the code I’ve found so far also removes the icons.

How can I adjust the text without removing the icons?

Thanks!

Hello,

It looks like it requires some PHP modifications, can you please provide a link to an affected website in order to let me check it? You can use some link shortener if you don’t want to leave the link to your site in this topic.

Kind Regards, Roman.
aThemes Support

Yes, it looks the same to me. I’m already using a child theme and I tried adding code to my functions.php file, but the icons disappeared. Normally, I’d track down the original code and reverse engineer a solution, but I’m having a hard time finding it.

Here’s my site: https://theashleyrebel.com/journal/

Hello, and thank you for the link.

You can remove “Posted” and “Posted in” in the inc/template-tags.php file, line 81 and 100.

Also, you might want to check this tutorial:

Please feel free to ask any other questions that you might have.

Kind Regards, Roman.
aThemes Support

Thanks. That’s a big help. The article makes perfect sense.

I do, however, have one more question. I don’t see a hook for the functions in the parent theme. What action do I hook the child theme functions to in order to override the parent theme functions?

Hello,

What action do I hook the child theme functions to in order to override the parent theme functions?

The sydney_posted_on() function is called in content PHP templates, it should be enough to add it with another name (for example modified_sydney_posted_on) to your child theme functions.php file and modify the relevant content PHP templates to call the modified_sydney_posted_on() function, and not the sydney_posted_on(). Please let me know if you need more help.

Kind Regards, Roman.
aThemes Support

Fantastic. That takes care of it on the blog page, but not on individual posts, where the word “posted” still appears to the right of the calendar icon. Where do I adjust that?

Hello,

That takes care of it on the blog page, but not on individual posts, where the word “posted” still appears to the right of the calendar icon. Where do I adjust that?

Did you replace the sydney_posted_on() function in the content-single.php file (line 21)?

Kind Regards, Roman.
aThemes Support

Thank you so much for your help! That was perfect. :slight_smile:

1 Like

You are welcome!

And have a nice day :slight_smile:

Kind Regards, Roman.
aThemes Support