Get Custom URL For Custom Taxonomy

Sorry to come to the party late. Here is my solution

<?php
    //Retrieve the terms in productcategory taxonomy with posts (not empty)
    $terms = get_terms( array ( 'taxonomy' => 'productcategory', 'hide_empty' => false, 'parent' => 0, 'orderby' => 'description', 'order' => 'ASC' ));

    //loop through each term to get its attributes
    foreach ($terms as $term) {

        //Uncomment below code to see all the available attributes.
        //var_dump($term); 
        //die();
        $name        = $term->name;

        //PHP -> Store the link in variable to reuse
        //to get the link for the the particular term; you need to have the slug and pass it into the get_term_link() function.
        //the second argument is the taxonomy name in this case productcategory.
        $cat_link    = get_term_link( $term->slug, 'productcategory' );

?>

<a href="https://wordpress.stackexchange.com/questions/224748/<?php echo $cat_link; ?>"><?php echo $name; ?></a>

<?php
    }

?>

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)