jam Posted June 21, 2007 Report Share Posted June 21, 2007 Varbūt kāds šo zin te, jo Wordpress forumā visi guļ, laikam. Kā lai es no Wordpress Permalinka ar GET metodi dabūju page-slug ? Man vajadzīgs viens IF iekš tempeita. Tipa if ($_GET['kautkacparametrs']=='kaut ko') tad darām kaut ko. Kāds ir tas page-slug parametrs? Link to comment Share on other sites More sharing options...
andrisp Posted June 21, 2007 Report Share Posted June 21, 2007 if ($_GET['page-slug']=='kaut ko') ? Vai nu arī es kaut ko nesaprotu. Link to comment Share on other sites More sharing options...
jam Posted June 21, 2007 Author Report Share Posted June 21, 2007 if ($_GET['page-slug']=='kaut ko') ? Vai nu arī es kaut ko nesaprotu. Nee, šitais neko neatgriež atpakaļ. Pamēģini echot to. Link to comment Share on other sites More sharing options...
andrisp Posted June 21, 2007 Report Share Posted June 21, 2007 Nu ja neatgriež, tad neeksistē tāds GET mainīgais. Varbūt wordpress unset'o to ? Pamēģini print_r($_GET); un paskaties, kas tur ir. Link to comment Share on other sites More sharing options...
jam Posted June 21, 2007 Author Report Share Posted June 21, 2007 Nu ja neatgriež, tad neeksistē tāds GET mainīgais. Varbūt wordpress unset'o to ? Pamēģini print_r($_GET); un paskaties, kas tur ir. atgriež nafig tukšu :( Array ( ) tad sanāk, ka pie viņa tikt nevar? Link to comment Share on other sites More sharing options...
Val Posted June 21, 2007 Report Share Posted June 21, 2007 šito domāji? http://codex.wordpress.org/Using_Permalinks Link to comment Share on other sites More sharing options...
jam Posted June 21, 2007 Author Report Share Posted June 21, 2007 šito domāji? http://codex.wordpress.org/Using_Permalinks Tur jau tikai aprakstīts, ka permalinki definējas Admin pusē, nevis kā es varu dabūt konkrētu Postname slug no URLa ar $_GET. Link to comment Share on other sites More sharing options...
Val Posted June 21, 2007 Report Share Posted June 21, 2007 Tad nolasi url'u un izvelc ārā, kas vajadzīgs... Link to comment Share on other sites More sharing options...
jam Posted June 21, 2007 Author Report Share Posted June 21, 2007 Labi, pofig, atrisināšu to ar post ID palīdzību. Link to comment Share on other sites More sharing options...
Paulinjsh Posted June 22, 2007 Report Share Posted June 22, 2007 šamie kkādā citā mainīgajā lasīja, cik virspusēji skatījos Link to comment Share on other sites More sharing options...
Recommended Posts