WordPress sisteminde eklenti yada tema tasarimcilari icin bazen guncel yani o anda bulundugunuz sayfanin tam linkini almaniz gerekebilir. Bunun icin bir kac kod yazacagim, ilerde benimde, sizinde isinize yarayacaktir.

global $wp;

$current_url = add_query_arg( $wp->query_string, '', home_url( $wp->request ) );

echo $current_url;

yada

echo 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];

Yararlandigim kaynaklar
http://kovshenin.com/2012/current-url-in-wordpress/
http://stackoverflow.com/questions/3031973/get-current-page-url-and-title-in-php

CEVAP VER

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.