Lista de parâmetros do WordPress

Parâmetros mais procurados na hora de desenvolver seus temas:

<?php echo get_site_url(); ?> // URL Raiz do Site
<?php echo get_stylesheet_directory_uri(); ?> // URL Raiz do Template

Referências: (https://codex.wordpress.org/Function_Reference/get_stylesheet_directory_uri) e (https://mekshq.com/get-current-page-url-wordpress)

Código para URL da página atual:

global $wp;
$current_url = home_url( add_query_arg( array(), $wp->request ) );

/* For example if your website is "https://ivonfilho.com/mesmo-post", 
it will return "some-post" */
 
global $wp;
$current_slug = add_query_arg( array(), $wp->request );

Para single post ou página, single.php ou page.php:

$obj_id = get_queried_object_id();
$current_url = get_permalink( $obj_id );

Para taxonomy.php, category.php, tag.php etc…

$obj_id = get_queried_object_id();
$current_url = get_term_link( $obj_id );

Para author.php:

$obj_id = get_queried_object_id();
$current_url = get_author_posts_url( $obj_id );

Para front-page.php ou home.php:

$current_url = home_url( '/' );