Welcome To Snipplr
Everyone's Recent PHP Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
This is a really short function you can use inside The Loop to get the parent page slug (useful to add to the body classes or something)
0
2818
posted 13 years ago by tomasdev
The date format is dd/mm/YYYY but you can replace slashes by anything else.
0
649
posted 13 years ago by ptiswitz
If a post is published without setting a featured image and there is an image attachment, this will select an image from the media library and set it as the featured image.
0
615
posted 13 years ago by chrs
Put this code in your theme, where you want to show followers count. Don't forget to change USERNAME.xml to your twitter user name.
0
682
posted 13 years ago by kirichev
Re-indexes an array so that the array keys count up from zero. This is useful if you have previously removed some array nodes.
0
524
posted 13 years ago by f6design
Most of this code is by:
http://www.wprecipes.com/get-tags-specific-to-a-particular-category-on-your-wordpress-blog
I simply added the Tag Cloud
0
638
posted 13 years ago by daif
Embed a video via PHP without using `the_content` filter in WordPress. From luckykind at http://wordpress.org/support/topic/call-function-called-by-embed-shortcode-direct
0
540
posted 13 years ago by jevets
Mix EE channel tag into javascript add the following code into the config array.
0
563
posted 13 years ago by audiopleb
Say you don’t want to reset ALL your orders, maybe you want to PRUNE a production database. if that’s the case, this php file (added to a crontab, or ran from your magento root directory) will DELETE all cancelled orders (5000 limit per instance)...
0
551
posted 13 years ago by hotdiggity