Welcome To Snipplr
Everyone's Recent PHP Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Found This Code to make a stats page view for a client. Make Sure your header input format is PHP.
0
838
posted 13 years ago by Onfire60
Simple, It gets the referer and if there wasn't a referer it displays just the home link, but when there is a referer it dispays both back and home, I personaly use this on my 404 page.
1
869
posted 13 years ago by mentaljason
Date format guide:
d = 01 to 12 ;
m = 01 to 12 ;
More formats: http://php.net/manual/en/function.date.php
1
783
posted 13 years ago by sdxxx
This function will transform any string to an seo url like string. It suports latin, french and german special characters.
Example: applying the function to "Exemplo de aplicação da função" returns "exemplo-de-aplicacao-da-funcao"
2
925
posted 13 years ago by KabuqueJoe
Clean up the crap in wp_head(). Put it in yo functions file.
1
872
posted 13 years ago by vagrantradio
This lists all the pages that are "Published", excluding the current one. Useful for a sitemap template.
0
604
posted 13 years ago by ToddSmithSalter
shortcode :
[rss size="10" feed="http://wordpress.org/news/feed/" date="true"]
0
739
posted 13 years ago by nicomollet
Our basic WP navigation menu setup. See [this page](http://codex.wordpress.org/Function_Reference/wp_nav_menu) for more documentation.
0
646
posted 13 years ago by mindshare
You can use JUri object to extract the path or query string from a any url
0
998
posted 13 years ago by anagaiyahoocom
I did not created this, a friend provided it to me, and it seems really usefull so i thought i should share.
Usage: Paste that code in your functions .php and in your theme you put <?php> where 20 is the number of words you want
0
698
posted 13 years ago by johnsardine