0

I'm creating a site based on studiopress's executive pro theme. I'd like to remove the comment count that shows in the post meta in archive pages.

In a conventional WordPress workflow I would child the theme and edit the php directly.

In this particular case, I can't find the markup.

Is the post meta generated from a php template or a function? Where is it, and how can I alter it?

closed as off-topic by Michael, bueltge, birgire, Sisir, Howdy_McGee Aug 15 '16 at 21:58

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

0

Within your Executive Pro theme's functions.php, you can add a function that filters the post info.

In Genesis lib/functions/post.php, you'll find a genesis_post_info() function, and one particular line in it is:

$filtered = apply_filters( 'genesis_post_info', '[post_date] ' . __( 'by', 'genesis' ) . ' [post_author_posts_link] [post_comments] [post_edit]' );

That means you can filter genesis_post_info, and not include the [post_comments] (and [post_edit] as that is available from the admin toolbar anyway) part of it.

add_filter( 'genesis_post_info', 'gmj_remove_comments_count' );
/**
 * Remove comments count and Edit link from post info.
 *
 * @link http://wordpress.stackexchange.com/questions/235203
 */
function gmj_remove_comments_count() {
    return  '[post_date] ' . __( 'by', 'your-theme' ) . ' [post_author_posts_link]' );
}

Not the answer you're looking for? Browse other questions tagged or ask your own question.