Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
get_page_slug() returns full url instead
#1
Question 
Fo some reason that I cannot determine, the call to function get_page_slug() is returning the full url of the page rather that the actual slug.

Does anyone have any idea what wrong and how I can fix it?

The file theme_functions.php where the function lies, references the global variable $url, which contains the same data. The $url variable is set in index.php and references $data_index->url and from there I haven't been able to back trace it.

Edit:

$data_index->url contains only the page slug. So, my guess is that there is a plugin or something that is using a variable $url, but is casting it globally and therefore messing with the GS global variable $url.

Hmmm... Further investigation is needed. Any input welcome...
Check out my website: JohnStray.com
Reply
#2
Try disabling any plugins you have installed, one by one until you find which one it is.
If still doesn't work properly, check if you have any custom code in components or in your theme's functions.php
Reply




Users browsing this thread: 1 Guest(s)