GetSimple Support Forum
get_page_slug() returns full url instead - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16)
+--- Thread: get_page_slug() returns full url instead (/showthread.php?tid=6247)



get_page_slug() returns full url instead - johnstray2001 - 2014-05-13

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...


RE: get_page_slug() returns full url instead - Carlos - 2014-05-13

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