Welcome To Snipplr
Everyone's Recent PHP Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
For example, when you can't get the post author to shop up using the_author(); it usually means your working outside the loop while that function is meant to work inside the loop.
This is a way around it. (got it from the forums)
0
546
posted 14 years ago by Rembrand
passing php variables to javascript with build-in function 'wp_localize_script'.
1
861
posted 14 years ago by screamwork
Quick and easy way to determine if the HTTP request is an AJAX call or a standard call. Supports the notion of Unobtrusive JavaScript.
3
1215
posted 14 years ago by joshuascott94
Wordpress - 404 problem on physical directories. From the Support Forum.
0
601
posted 14 years ago by kyuumeitai
This will fetch the custom post types, displayed as a list with their respective permalinks.
0
912
posted 14 years ago by ivorpad
Pulling posts from outside wordpress (in the right way!) as a response for this snippet: http://snipplr.com/view/39523/pulling--posts-from-outside-wordpress/
0
1307
posted 14 years ago by bronet
Not is mine, I found it online, I just found it and modified it\r\n\r\nI do not remember where I took if anyone knows the original URL I will include it
2
842
posted 14 years ago by elalecs
Returns an HTML string of taxonomy terms associated with a post and given taxonomy. Terms are linked to their respective term listing pages.\r\n\r\nThis is for when a custom taxonomy is registered for a custom post type.
2
1111
posted 14 years ago by Jamie
Use this to remove or change the wp-admin footer text. Default is
Thank you for creating with WordPress.
1
750
posted 14 years ago by Farhan
All code should ideally go into your theme\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'s template.php file. I\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'ve used the default Garland theme here as an example.
0
810
posted 14 years ago by hiddentao
Orders a multi-dimensional field (such as sorting multiple $orders by field 'id')
0
922
posted 14 years ago by jmiller
A simple one liner that updates the Auth component's session variables when the user model is updated
0
573
posted 14 years ago by robksawyer