How can i remove the path that is displayed on the page when permalink is called?

Hello, happy weekend to all.
working on this little bit of code,

<?php 
			
			
			$args = array(
				'post_type' => 'bkPage',
				'post_per_page' => -1,
				'order'   => 'ASC'
	
			);
			
			$books =new WP_Query($args);
			echo'<div id="bkPages" class="bkPages" >';
			
				while($books->have_posts()) : $books ->the_post();
				echo'<div id="bkItem" class="bkItem">';
				
				echo '<div><a href="'.the_permalink().'">';
				the_post_thumbnail();
				the_title();
				echo '</a></div>';
				echo'<figure id="tNail" class="tNail">';
				//the_post_thumbnail();
				echo'</figure>';
				echo '</a>';
				
				
				echo'<div class="entry-content sb">';
				the_excerpt();
				echo'</sdiv>';
				
				echo'</div>';
				
			endwhile;
			echo'</div>';		

		
			wp_reset_query();
		
		?>

it works, but it also displays the full path for the link. which is unnecessary.
Thank you
D

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.