Welcome To Snipplr


Everyone's Recent PHP Snippets



1 ... 16 17 18 19 20 ... 147
<?php>
1 470 posted 11 years ago by Amistyle
This will take an IP and try to find the city.
0 799 posted 11 years ago by iTony
Convert 12-hour time format with hour, minutes, seconds, and meridiem into 24-hour format. Performs data correction to make sure hours, minutes and seconds have leading zeros if needed. The trick here is to use strtotime() where we pass the time...
0 3691 posted 11 years ago by kosinix
Sum all elements of a bidimensional or multi-dimensional array with an assigned key
0 729 posted 11 years ago by eortiz
This is a route that ables the website to show the user's profile to the world.
0 477 posted 11 years ago by rafaelfragosom
0 533 posted 11 years ago by openone
Get Wordpress wp_get_archives for a specific category... by default it sghows all categorys
0 1241 posted 11 years ago by i-am-andy
Get current url. Include domiain. For example :http:// localhost/root_folder.
0 1031 posted 11 years ago by tucq88
Just an example showing how to minimise the mixture of HTML and PHP in a view.
0 576 posted 11 years ago by JonnySnip3r
Place the function in your functions.php file of your theme... Then, simply call like this: wp_paginate('', 3); The first param is optional, the second dictates how many pages before and after the current page link will show...
0 570 posted 11 years ago by thewickedchemist
This function searches the current working directory (or any other directory path that you specify with parameter $p) for a file, named $f, and returns the full path and filename of the first occurrence, or false if it is either not found or the maxi...
0 636 posted 11 years ago by VisionHive
CREATE A HEADER MINI-CART IN WP E-COMMERCE - Part 3
0 680 posted 11 years ago by ecksteing
Insert this into a custom node template to display the metatags inserted in my the metatag module. <div>nid; ?>" class="<?php> clearfix"<?php>><?php>
0 531 posted 11 years ago by mktimes5
easy way of catching and displaying errors and return values from a exec() command back in PHP.
0 682 posted 11 years ago by iroybot
easy way of catching and displaying errors and return values from a exec() command back in PHP.
0 808 posted 11 years ago by iroybot
A simple code to read/write an XML file by using Cakephp 1.3.
0 851 posted 11 years ago by tucq88
Reduces the string size according to the parameter that has been send and put '...' at the end of the new string
0 458 posted 11 years ago by Gianino
Add this code in the top of your index.php and set $page_url to your application final tab/app URL.
0 724 posted 11 years ago by Whiteagle
The awesome Geo Mashup Plugin for WordPress allows for auto-embedding a map showing the location of the Post, Page etc via Shortcode or adding a line of PHP into the Theme file/s. The code below, added as a Plugin, will make a map appear at the en...
0 746 posted 11 years ago by ecksteing
Display Copyright
0 413 posted 11 years ago by evinweissenberg
//This will grab taxonomies three levels deep (parent, child, grandchild) and display them //in an accordion fashion. Parent is the header, then child with a checkbox, if checked, will //display grandchild taxonomies. //Uses jQuery Accordion (do...
0 622 posted 11 years ago by dnnsldr
Class that convert arrays to csv format, downloads CSV files and saves to disk on server.
0 839 posted 11 years ago by TimoZachi
I use this primarily for debugging purposes. This simply takes an array and creates an expandable item that prints the array out in a \<pre\> wrapping, making it easy to read. Very basic snippet.
0 820 posted 11 years ago by ringo380
I needed away to redirect to a custom BP component upon login for users and this works great. Add this to your functions file. If you are the admin, it will redirect you to the wp-admin.
0 12711 posted 11 years ago by dnnsldr
Allows you to connect to different datasources. Very common to use something like this for development,staging and production deployments.
0 664 posted 11 years ago by evinweissenberg
This is a useful class which utilizes Phil Sturgeon's helpful restclient (http://getsparks.org/packages/restclient/versions/HEAD/show). Reference the URL attached for PinnacleCart API docs. Example request URLs to get products and categories: #...
0 825 posted 11 years ago by crypticsoft
Twitter Clone v2.2.1 is the best available PHP clone of Twitter available online. Like our other products it is also extremely robust, user-friendly and very secured. Please visit http://itechscripts.com for this script and other FREE downloads.
0 792 posted 11 years ago by iTechScripts
Add this to functions.php to enable the page-child function is_tree
0 449 posted 11 years ago by klagraff
This function, when placed in a theme's 'functions.php' file will insert a custom id attribute into the '<li>' elements generated by a 'wp_nav_menu' function based on the title of the element. It will make a WordPress page or category into a hyphen s...
0 881 posted 11 years ago by SFLWebDev
1 ... 16 17 18 19 20 ... 147