Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged post



Dynamically get the guid of your a post from its post title (with wordpress caching)
0 1510 posted 14 years ago by prwhitehead
Simply define your POSTURL and POSTVARS in name = value string format. It will post the form.
0 1787 posted 14 years ago by kumar_sekhar
0 1378 posted 14 years ago by linkmoises
11 3321 posted 14 years ago by frederichoule
The code references a custom post type (mysite_listings) and adds custom columns for editing the listings in the admin. This adds custom fields onto the edit / list views. Note: You will want to change instances of "mysite_listings" with your own...
1 2165 posted 15 years ago by crypticsoft
Example shows how to register post types for : * Listings (defined as 'mysite_listings' with the rewrite slug 'lookup') * Then registers the 'usa_states' taxonomy to the mysite_listings post type.
0 1949 posted 15 years ago by crypticsoft
0 1221 posted 15 years ago by ramy
0 2519 posted 15 years ago by kendsnyder
Feel free to use this class however you'd like
0 1626 posted 15 years ago by jschilling
0 1291 posted 15 years ago by rliverman
0 1090 posted 15 years ago by baires
0 1515 posted 15 years ago by wnasich
Code for the wordpress functions file to add a custom post type. Full doc at: http://codex.wordpress.org/Function_Reference/register_post_type http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress
0 3550 posted 15 years ago by rliverman
0 1225 posted 15 years ago by jli
This will find the first image in post and return it as a thumbnail if it exists
0 2019 posted 15 years ago by howardpanton
Code in functions.php einfügen
0 1366 posted 15 years ago by PM-Webdesign
This function can be used to sanitize single string variable or massive like POST, GET, COOKIE. It performs magic quotes gpc check, strip tags, trim and escape the dangerous signs with mysql_real_escape_string.
0 1586 posted 15 years ago by stz184
0 1411 posted 15 years ago by Mat_
0 1512 posted 15 years ago by adampatterson
This will fetch the custom post types, displayed as a list with their respective permalinks.
0 1800 posted 15 years ago by ivorpad
By default wordpress does not include post thumbnails in RSS Feeds. Enable in by add this code the functions.php located inside your themes folder.
1 2027 posted 15 years ago by mediamilan
Returns the number of published posts in the given category.
0 1656 posted 15 years ago by mihael
This function returns the slug fot the given post...
0 1687 posted 15 years ago by mihael