Welcome To Snipplr


Everyone's Recent PHP Snippets



1 ... 9 10 11 12 13 ... 148
Check if current post type is a custom post type – WordPress. Returns a true/false-statement. Can be used outside The Loop.
0 797 posted 9 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 645 posted 9 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 511 posted 9 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 558 posted 9 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 649 posted 9 years ago by rickygri
This snippet is used to set some wordpress directories / paths directly to the server name.
0 596 posted 9 years ago by mralexjuarez
поиск значения в многомерном массиве
0 350 posted 9 years ago by noganno
I want to extract the numbers from a string that contains numbers and letters like
0 832 posted 9 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 508 posted 9 years ago by brownrl
Sanitize database inputs
0 351 posted 9 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 495 posted 9 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 447 posted 9 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 427 posted 9 years ago by almendro
How to put sidebars footer on twenty twelve theme again. Part 1: Insert the call in the footer.php
1 466 posted 9 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 527 posted 9 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 708 posted 9 years ago by freelancephp
Get current page
0 474 posted 9 years ago by webkitvn
Wordpress admin area functions
3 504 posted 9 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 503 posted 9 years ago by devowhippit
For this to work add class "[CPT]-menu-item" to your menu item.
0 975 posted 9 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 538 posted 9 years ago by ShawnG
register custom menus
0 534 posted 9 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 570 posted 9 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 588 posted 9 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 719 posted 9 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 433 posted 9 years ago by brownrl
Easy way to access request URI to WP in order to not repeat whole templates for minor changes
0 620 posted 9 years ago by jefrancomix
Wordpress Widget Basic Stucture
1 544 posted 9 years ago by Scoldy
Follow me on twitter flexible user and message Add to post [twitter username='VeronicaDjeneva']Follow me Somebody[/twitter]
0 393 posted 9 years ago by Scoldy
1 ... 9 10 11 12 13 ... 148