Add post type icons to Ethos and remove author

Hi - I need to add post type icons alongside the headline of my blog posts. I know I could do this by switching to renew or icon, but I’d like to keep Ethos, as I’ve already made several customizations to the child theme that are stack-specific. Is there a way to add them to Ethos?

Also, I need to show the date and categories meta, but not the author. I’ve found articles in the forum with code to do this, but each time it mashes the date and categories up against each other, with no spacing or separator. How can I do this but maintain the separation?

Hi @jacvodden,

Thanks for reaching out.
The Ethos stack does not have the CSS class added for the Post Formats, you need to add the following custom CSS code into the Theme Options > CSS to get the icons.

.format-standard .entry-title:before
{
    font-family:'FontAwesome';
    content:"\f15c"
}
.format-video .entry-title:before
{
    font-family:'FontAwesome';
    content:"\f008"
}
.format-audio .entry-title:before
{
    font-family:'FontAwesome';
    content:"\f001"
}
.format-image .entry-title:before
{
    font-family:'FontAwesome';
    content:"\f083"
}
.format-gallery .entry-title:before
{
    font-family:'FontAwesome';
    content:"\f03e"
}
.format-link .entry-title:before
{
    font-family:'FontAwesome';
    content:"\f0c1"
}
.format-quote .entry-title:before
{
    font-family:'FontAwesome';
    content:"\f10d"
}

To remove only the Author from the Post, you need to follow the steps below:

  1. Copy the _content-post-header.php file from the parent theme wp-content\themes\pro\framework\views\ethos
  2. Paste the file into your child theme in same location wp-content\themes\pro-child-theme\framework\views\ethos
  3. Change the function name called in the line 20 named x_ethos_entry_meta to x_ethos_entry_meta_child
  4. Copy the function x_ethos_entry_meta from your parent theme pro\framework\functions\frontend\ethos.php
  5. Paste it to your child theme functions.php and rename it to the x_ethos_entry_meta_child
  6. And comment out or delete the line $author = sprintf( __( ‘by %s’, ‘x’ ), get_the_author() ) . ‘’;

Remember that the above code(s) will work if copied as it is and don’t conflict with any existing style.
Please note that the code provided serves only as a guide to help you get started custom coding on your own if there’s no option offered in our theme or the products we bundle.
We do not provide support for custom codes that means we can’t fix it in case it conflicts with something on your site nor will we enhance it.

Thank you so much!

You’re welcome.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.