@Linosa
your code seems to assign the css class .current-page-item
and .current-subpage-item
resp.
do you have corresponding styles in style.css?
for instance:
.current-page-item a { ... }
.current-subpage-item a { ... }
so what is not working?
a link to your site might help to illustrate your problem.