Display Author name in Ethos

Hello, im using ETHOS and trying to display authors name in meta. I tried this but it didn’t work:

// Custom Entry Meta
// =============================================================================

if ( ! function_exists( ‘x_icon_entry_meta’ ) ) :
function x_icon_entry_meta() {

$date = sprintf( '<span><time class="entry-date" datetime="%1$s">%2$s</time></span>',
  esc_attr( get_the_date( 'c' ) ),
  esc_html( get_the_date() )
);

//
// Author.
//

$author = sprintf( '<br/><span>%s</span>',
  get_the_author()
);

if ( x_does_not_need_entry_meta() ) {
  return;
} else {
  printf( '<p class="p-meta">%1$s%2$s</p>',
    $date,
    $author
  );
}

}
endif;

TIA Rena

Hey Rena,

That code you posted is for the Icon stack. There’s no need to display the author in Ethos as it is already included out of the box. Please check our Ethos demo at http://demo.theme.co/ethos-1/

It looks like you already have done some customization to Ethos meta. Please find the code in your functions.php and remove it so the original Ethos meta will be used or you can tweak it if you need to remove an element in the meta.

Thanks.

Im not sure what code your referring to . Yes I added code to add a author box on the bottom, but i only did that bc an author was not showing up in the top next to date and comments nor on the bottom. I have since removed that code and still not author in the meta area. I also removed all CSS to see if it was anything there… but still no author in the meta.

Can you please tell me what it is that I did to block it?

Rena

I was referring to the code you posted in your first post. It will not work because it’s for the Icon stack and you’re using Ethos.

As I have also said, you probably have already customized the Ethos Meta because the original Ethos meta has the Author Name included.

Please switch to the parent theme and check if the issue persists. We need to know if this issue is caused by the parent theme and not by customizations.

If the issue is in the parent theme, please give us WordPress Admin and FTP access in a Secure Note.

If the issue is coming from your customizations, please consult with a third party developer because we do not have support for customization issues.

Thanks.

Oh gotcha, yea I removed that as soon as it didnt work.

I have switched the theme back to the parent theme. But still no author.
Ill send the info…

Hello @fatcatgraphics,

Thanks for updating the thread.

Can you please confirm the admin login details as I am getting ERROR: Incorrect username or password. ERROR: Too many failed login attempts. Please try again in 1 minute. error message?

Thanks.

I just changed the password…

Hello Rena,

The given user credentials is still not working for us.
Please double check it again.

Thank you.

strange, I just copy and pasted directly from this email to be sure and I got in no problem.
Your going to this url: http://pzu.a90.myftpupload.com/wp-admin/

correct? The username and password are definitely correct. Ive tested it twice now.

I just realized I gave you the wrong URL! SO SORRY!!! So yea its that last one I posted :pensive:

Hi Rena,

Your meta is not displayed because you have the following CSS rule into your Pro -> Theme Options -> CSS area.

.p-meta span:nth-child(1) {
  display: none !important;
}

Once you remove that, your meta information will be displayed.

Hope that helps.

:anguished:

UGH! Sorry to have wasted so much of your time. I had deleted all my CSS over and over but no changes were seen live so I didn’t think it was there!

Thank you so much.
Rena

:anguished:

actually another question. Now that I have the author displayed. I tried hiding just the category but it hides the author too. How can I hide the category only. Or if you can tell me what php file this info comes from that could be helpful too.

Im trying to achive:

By Shoshanna M. / September 6, 2018

Thanks
Rena

Hi Rena,

Try assigning a class into your category element and then use a CSS rule to hide it.

For example locate the following code:

$categories_list = sprintf( '<span>%1$s %2$s',
        __( 'In', '__x__' ),
        trim( $categories_output, $separator )
);

Then assign a class as follows.
'<span class="meta-category">%1$s %2$s',

Then use the following CSS rule to hide it.

.meta-category{
  display:none;
}

In what file would I locate that code in ??

Hello @fatcatgraphics,

Thanks for updating the thread. :slight_smile:

Under /wp-content/themes/pro/framework/functions/frontend/ please open ethos.php file and you can find the code around line number 70.

As you have already installed child theme. I suggest you to copy the file ethos.php in child theme under /wp-content/themes/pro-child/framework/functions/frontend/ and make the changes over there. Please don’t make changes directly into the parent theme files as changes will be lost when you update the theme.

Thanks.

Thank you!

You’re most welcome!

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