// Get post permalink (you can use it inside a wp_query loop)
<?php the_permalink(); ?>
// or
<?php $link = get_the_permalink(); ?>
// outside the loop:
<?php echo get_permalink( $post->ID ); ?>
$term_link = get_term_link( $term->term_id, "hardware_categories" );
<?php
if(count($related)) {
echo "<div>Read More<ul>";
foreach($related as $id) {
echo '<li><a href="'.get_permalink( $id ).'">'.get_the_title( $id ).'</a></li>';
}
echo "</ul></div>";
}
?>