Welcome To Snipplr


Everyone's Recent PHP Snippets



1 ... 9 10 11 12 13 ... 147
Check if current post type is a custom post type – WordPress. Returns a true/false-statement. Can be used outside The Loop.
0 885 posted 10 years ago by jonasethomsen
Open your function.php of your active Theme. Copy your code insert and call the new Site URL. After delete the code snippet.
0 712 posted 10 years ago by WMSchneider
This extension allows Magento based store owners to give their visitors an advance feature of creating gift registry for their upcoming wedding, engagement or birthday party. The registry creator can share the link of the wish-list on its social netw...
0 561 posted 10 years ago by simonwalker
This extension has been developed by Fme for Magento store owners. This extension enables store owners to post FAQ in separate page as well as under each product page. The customers can post questions, rate, like or comment on existing questions. The...
0 610 posted 10 years ago by simonwalker
This function can be used to check if a file exists using the HTTP header response. Example use, when looping through cached JSON objects (instagram API, etc.)
0 705 posted 10 years ago by rickygri
This snippet is used to set some wordpress directories / paths directly to the server name.
0 671 posted 10 years ago by mralexjuarez
поиск значения в многомерном массиве
0 386 posted 10 years ago by noganno
I want to extract the numbers from a string that contains numbers and letters like
0 903 posted 10 years ago by satie83
This is a custom field handler for a Drupal view. Sometimes you have two or more fields in a content type and you want to do a test on them to see if both are empty or both full or exclusive and return that as a field. There are probably ways to d...
0 550 posted 10 years ago by brownrl
Sanitize database inputs
0 391 posted 10 years ago by mrglazzz
You can use Curl to create a backup of your site easily. It is very effective method for those who complain that they lost site content.
0 549 posted 10 years ago by codehero11
How to put sidebars footer on twenty twelve theme again. Part 4: Insert a new function (retouched from twentyeleven) in the functions.php file.
1 495 posted 10 years ago by almendro
How to put sidebars footer on twenty twelve theme again. Part 3: Insert this register_sidebar at the end of the function twentytwelve_widgets_init() into functions.php
1 468 posted 10 years ago by almendro
How to put sidebars footer on twenty twelve theme again. Part 1: Insert the call in the footer.php
1 506 posted 10 years ago by almendro
Takes one or two PHP timestamps, and returns a somewhat humanized string representing the date range * Jun 7th, 2013 * Jun 7th-11th, 2013 * Jun 7th-Jul 3rd, 2013 * Jun 7th, 2013-Jan 1st, 2013
0 588 posted 10 years ago by vodou
Configure settings for all external links on your site. Features: * Open external links in new window or tab * Add "nofollow" * Set link title * Set link icon * Set classes (for your own styling) * Set no-icon class * SEO friendly
0 760 posted 10 years ago by freelancephp
Get current page
0 517 posted 10 years ago by webkitvn
Wordpress admin area functions
3 549 posted 10 years ago by andrewcolby
Breaks up an address (in this case returned by Advanced Custom Fields Location plugin) into it's components. Additionally, sorts a multidimensional array of locations alphabetically by state. This works for basic addresses assuming that address is in...
1 574 posted 10 years ago by devowhippit
For this to work add class "[CPT]-menu-item" to your menu item.
0 1046 posted 10 years ago by ihatetomatoes
Returns array with information like: Input image width 200 height 200 print_r(ratioResize('path/to/image.ext' , 100 , 50)); output: array( [ratio] => .5, [height] => 50, [width] => 50,...
0 589 posted 10 years ago by ShawnG
register custom menus
0 582 posted 10 years ago by thesmu
This allows you to create a custom page template in your plugin. Say your plugin creates a custom post type and you want to override the standard archives page template to display your custom post type in a special way. You could achieve this by crea...
0 636 posted 10 years ago by bitsculptor
PHP function to save an image from a remote source then download it to the local server that the script is on.
0 659 posted 10 years ago by nshakin
This is my simple image resizer on the fly thing. -- WARNING -- Resizing and showing images on the fly could potentially kill your server or make the website slow. Ideally, this should save the resized image in a cache. However, more often th...
0 809 posted 10 years ago by brownrl
This is a simple script to go into your downloads directory ( mac ). Move everything to a .YYYY-MM-DD folder. Thus you Downloads directory gets cleaned up and anything that was there has been placed into a hidden folder for finding later. My Downl...
1 491 posted 10 years ago by brownrl
Easy way to access request URI to WP in order to not repeat whole templates for minor changes
0 663 posted 10 years ago by jefrancomix
Wordpress Widget Basic Stucture
1 587 posted 10 years ago by Scoldy
Follow me on twitter flexible user and message Add to post [twitter username='VeronicaDjeneva']Follow me Somebody[/twitter]
0 429 posted 10 years ago by Scoldy
1 ... 9 10 11 12 13 ... 147