GetSimple Support Forum

Full Version: get_page_slug() returns full url instead
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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...
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