get the url wordpress code example
Example 1: current url wordpress
global $wp;
echo home_url( $wp->request )
Example 2: wordpress get link
<a href="<?php the_permalink(); ?>">
global $wp;
echo home_url( $wp->request )
<a href="<?php the_permalink(); ?>">