The category link that you are referring to, that is displayed beneath the single post page content is not added with a filter. It is displayed via a function called twentyseventeen_entry_footer()
.
If you take a look at the themes files you can find the function on line #59, within the file:
/wp-content/themes/twentyseventeen/inc/template-tags.php
Here is the twentyseventeen_entry_footer()
functions code:
if ( ! function_exists( 'twentyseventeen_entry_footer' ) ) :
/**
* Prints HTML with meta information for the categories, tags and comments.
*/
function twentyseventeen_entry_footer() {
/* translators: used between list items, there is a space after the comma */
$separate_meta = __( ', ', 'twentyseventeen' );
// Get Categories for posts.
$categories_list = get_the_category_list( $separate_meta );
// Get Tags for posts.
$tags_list = get_the_tag_list( '', $separate_meta );
// We don't want to output .entry-footer if it will be empty, so make sure its not.
if ( ( ( twentyseventeen_categorized_blog() && $categories_list ) || $tags_list ) || get_edit_post_link() ) {
echo '<footer class="entry-footer">';
if ( 'post' === get_post_type() ) {
if ( ( $categories_list && twentyseventeen_categorized_blog() ) || $tags_list ) {
echo '<span class="cat-tags-links">';
// Make sure there's more than one category before displaying.
if ( $categories_list && twentyseventeen_categorized_blog() ) {
echo '<span class="cat-links">' . twentyseventeen_get_svg( array( 'icon' => 'folder-open' ) ) . '<span class="screen-reader-text">' . __( 'Categories', 'twentyseventeen' ) . '</span>' . $categories_list . '</span>';
}
if ( $tags_list && ! is_wp_error( $tags_list ) ) {
echo '<span class="tags-links">' . twentyseventeen_get_svg( array( 'icon' => 'hashtag' ) ) . '<span class="screen-reader-text">' . __( 'Tags', 'twentyseventeen' ) . '</span>' . $tags_list . '</span>';
}
echo '</span>';
}
}
twentyseventeen_edit_link();
echo '</footer> <!-- .entry-footer -->';
}
}
endif;
As you should see from the original function code, the first line is:
if ( ! function_exists( 'twentyseventeen_entry_footer' ) ) :
So, if the function already exists the code in the parent theme will be ignored. Due to the way WordPress works, it loads the child themes functions.php file first, before the parent theme.
In order to modify this code you would copy or create your own twentyseventeen_entry_footer()
function within your child themes functions.php
file (without the function_exists()
line, and without the final endif;
line).
Therefore, by creating the twentyseventeen_entry_footer()
function within your child theme, this will override the default functionality of the parent themes function.
If you just wanted to remove this category link completely, you do this with a simple template file override. If you need to know how to do this, just add a comment to this answer and I can add further instructions.