Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php obtener slug wordpress


   $url = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
   $slug = trim(parse_url($url, PHP_URL_PATH), '/');

   var_dump($slug);
   if ($slug == "tienda-online" ||  $slug == "tienda-online-frio") {
   }
 
PREVIOUS NEXT
Tagged: #php #obtener #slug #wordpress
ADD COMMENT
Topic
Name
8+8 =