Remove Category from Post Header and Featured Posts in Ethos

I’d like to display the author and date, but not display the category for posts, featured posts, and post carousel in Ethos. (basically nowhere!) Can you please assist? The website is www.theearlofindy.com. Thank you!

Hello @StacyD,

Thanks for writing in!

Since the child theme is set up, please add the following code in your child theme’s functions.php file

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

if ( ! function_exists( 'x_ethos_entry_meta' ) ) :
  function x_ethos_entry_meta() {

    //
    // Author.
    //

    $author = sprintf( ' %1$s %2$s</span>',
      __( 'by', '__x__' ),
      get_the_author()
    );


    //
    // Date.
    //

    $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() )
    );

    //
    // Output.
    //

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

  }
endif;
// =============================================================================

This code will display only the author and date of the post meta.

We would love to know if this has worked for you. Thank you.

This worked great. We made one small tweak – added a space so that there was a space between author and date. Otherwise they ran together.

printf( ‘

%1$s% 2$s

’,

THANK YOU!!!

You’re welcome!
We really appreciate for letting us know that it has worked for you.

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