Welcome To Snipplr
Everyone's Recent PHP Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
I needed a way to generate some random strings for passwords, a number of methods seemed a little over the top so below is my simplified version that does the trick. I have set it to use non-confusing characters, so no i's, l's, 0's but very easy to...
0
617
posted 13 years ago by motlive
returns "City, State" if found otherwise defaults to "Hollywood, CA"
18
7115
posted 13 years ago by crypticsoft
Modify the array to get different number of posts, change the order, change / add categories etc.
1
663
posted 13 years ago by amyb
this is pretty useful if you want to use the wordpress blog system to feed a custom application/site of yours
0
535
posted 13 years ago by louisdedecker
## Benefit
To notify visitors that the current post they are viewing is an old post. Suitable for Blog / Website that provide timely articles
0
632
posted 13 years ago by firewalker06
Inserts WordPress shortcode outside the loop in a template
1
481
posted 13 years ago by primitiveshaun
Needed this to have the index.php or main blog page show the full content for the first two posts and then just the excerpt for the rest and still have pagination working.
2
632
posted 13 years ago by rliverman
Custom sorting for events based on a custom field
needs to be added to navigation-links.php
requires plugin: http://wordpress.org/extend/plugins/ambrosite-nextprevious-post-link-plus/
0
748
posted 13 years ago by hussong
I'm using this out of laziness.
PHP is slowing things down here, since it's not as close to C as XPath.
A better solution would be to have an attribute specifically for search purposes (either in upper or lowercase).
0
618
posted 13 years ago by iroybot
A simple one page form with attachment that is meant to go straight to the email and not uploaded to the server. Emails an HTML version, a PlainText version and the attachment if there is one.
4
1067
posted 13 years ago by StevenW721