Show Pages for all Category Links but not for Childless Categories

i can rewrite Category base in Permalink Settings or use

function wpa_alter_cat_links( $termlink, $term, $taxonomy ){
if( 'category' == $taxonomy  0 == $term-parent ){
    return str_replace( '/category', '', $termlink );
}
return $termlink;
}
add_filter( 'term_link', 'wpa_alter_cat_links', 10, 3 );

to change the Links for the Categories. I made Pages where Users can find the most important links on that Subject. I would like to have the last link, when there is no more child to the link still display all the Post from that Category with category.php. I tried with

 $term-childless

but got no luck so far, also i wonder what the 10,3 in the add_filter means, is this some Category IDs? I fouind this solution here: Force Wordpress to Show Pages Instead of Category

Topic child-pages url-rewriting permalinks categories pages Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.