Hi I need some help with an active link not working in my wordpress theme. In the blog archive page I made some buttons to divide the archives blogs in sub categories however the active pseudo not working.
The php i’m using to get the subcategories list is
<div class="archive-subcategories">
<?php $subcategories = get_categories('&child_of=5&hide_empty');
echo '<ul class="resource-subcategory">';
foreach ($subcategories as $subcategory) {
echo sprintf('<li class="sub-category">
<a class="link-active" href="%s">%s</a></li>', get_category_link
($subcategory->term_id), apply_filters('get_term', $subcategory->name));
}
echo '</ul>';
?>
</div>
I’ve tried a few options but with no luck.
Any help would be appreciated.