Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged php



1 ... 19 20 21 22 23 ... 58
Returns the number of days in the month taking leap-years into account.
0 1733 posted 15 years ago by tasmanweb
A better and more accurate function to see if a value is an integer.
0 1652 posted 15 years ago by tasmanweb
Add code in first line your page.
0 1440 posted 15 years ago by tcelestino
Place this at the top of your php files. This will remove white space and formatting from HTML, making it smaller and faster for download by your users.
0 1648 posted 15 years ago by trusktr
Do not forget to name images you want to use for background like 1.jpg, 2.jpg, 3.jpg etc.
0 1310 posted 15 years ago by ariunbolor
1 1808 posted 15 years ago by abelb
0 2669 posted 15 years ago by serialk89
Returns the video id for any type of youtube url that holds one.
2 2530 posted 15 years ago by KabuqueJoe
Returns all of the custom fields (meta data) from a page / post and assigns them all to a single session array for compactness
1 1767 posted 15 years ago by prwhitehead
Make sure your URL $_GET variables don't get repeated / duplicated when you are creating links / URLs dynamically.
0 2490 posted 15 years ago by prwhitehead
If your page has already sent headers to the browser you cant redirect with headers('Location:' . $url); But you can use the following:
0 1360 posted 15 years ago by prwhitehead
Add a login form to your wordpress themes frontend.
0 1983 posted 15 years ago by prwhitehead
Create your own wordpress hooks easily and simply. Just rename the function to whatever you like.
0 1469 posted 15 years ago by prwhitehead
Create custom database tables within wordpress. Just replace 'stats' with the name of your table, and then the $sql variable with your create table sql.
0 2048 posted 15 years ago by prwhitehead
Remove menu items from the wordpress admin
0 1612 posted 15 years ago by prwhitehead
To remove some of the lesser used edit post / page meta boxes:
0 1751 posted 15 years ago by prwhitehead
Create a sitemap in wordpress, including posts, categories and pages just use the [sitemap] shortcode within the post content and wordpress / the function does the rest.
0 1845 posted 15 years ago by prwhitehead
Create excerpts from text block from your wordpress content and add links page / post from the guid.
0 1810 posted 15 years ago by prwhitehead
0 1566 posted 15 years ago by blueocto
In the User settings, there is a web form called Contact Info. It has input fields for the user’s AIM account, Yahoo IM account, and so on. But how about Twitter? What about Facebook? Out of the box, the Contact Info panel doesn’t have these i...
0 1842 posted 15 years ago by blueocto
This is a great place to add your own custom Help text for a client. You can even customize it for different Admin panels. For example, you can add a different Help text for the Add New Post panel and another one for the Comments panel. Here’s h...
0 1653 posted 15 years ago by blueocto
It’s possible to disable it conditionally for each WordPress user by going to Users > Your Profile. However, if you want to remove it completely, you can add the following filter:
0 1634 posted 15 years ago by blueocto
The special characters in the file name caused problem when the exported to iphone application.
0 1710 posted 15 years ago by punuhan
simple pass the file name and that file will be available for download
0 2670 posted 15 years ago by kumar_sekhar
0 1495 posted 15 years ago by dsoms
3rd argument of 'add_action' function is priority, by default set to 10. This is a much simpler way of reorder posts exactly as you want them to appear.
1 1309 posted 15 years ago by mrgurner
_PHP Snippet for Paying via Paypal_ This snippet is designed for most open source invoicing applications that you have control over the template setup. There multiple free or open source PHP applications that you can download server-side and imple...
2 1870 posted 15 years ago by creativeboulder
1 ... 19 20 21 22 23 ... 58