wp_get_archives doesn’t take effect from css or html

enter image description here

i’ll try to keep it short. So basically i’m trying to add custom item to my menu which in this case is the archive dropdown list with months desc. Everything looks nice and clean but the output of .wp_get_archives which also ignores all of the css

function add_archive_dropdown($items, $args) {
      if( $args->theme_location == 'primary' ){
      $items .='<li class="nav-item dropdown">'
                .'<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">'
                .'<ul class="dropdown-menu" style="list-style:none;" aria-labelledby="navbarDropdown">'
                .'<a href="#">'.'August 2018' .'</a>'
                .wp_get_archives( array('type' => 'monthly', 'format' => 'html', 'show_post_count' => $c))
    return $items;

add_filter(‘wp_nav_menu_items’, ‘add_archive_dropdown’, 10, 2);


Read more here:: wp_get_archives doesn’t take effect from css or html

Leave a Reply

Your email address will not be published. Required fields are marked *