Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged c



1 ... 80 81 82 83 84 ... 147
A simple one liner that updates the Auth component's session variables when the user model is updated
0 1280 posted 15 years ago by robksawyer
Allows you to still view PHP parse errors, even if you don't have write access to your php.ini file. Since PHP pages are parsed before being executed, parse errors won't show up even if you turn on display_errors in the page you are checking.
2 1518 posted 15 years ago by Moridin
0 1675 posted 15 years ago by alexandrepayet
It's fun to read what I wrote ages ago. An ORM that was heavily influenced (or should I say misguided) by CakePHP, lol.
2 1750 posted 15 years ago by fredwu
<p>Add this line to &quot;functions.php&quot; in your theme directory to remove RSS feeds specific to categories. The primary blog RSS feed will still be accessible. </p><p>Taken from a post by Hollywood grind on the Wordpress.org forums.</p>
0 1616 posted 15 years ago by rgsmith007
This may be necessary to properly add theme support for multiple menus.
0 1704 posted 15 years ago by Jamie
To exclude pages from wordpress search results include the following in your theme's functions.php
0 1338 posted 15 years ago by myke
3 1825 posted 15 years ago by StephFR
Almost all Magento Models have a corresponding Collection object that can be used to fetch multiple instances of a Model
0 1450 posted 15 years ago by dmistriotis
See code comments for more details.
1 1857 posted 15 years ago by Sverri
Here's a little trick I started using when working with XAMPP for localhost and keeping things in tune with the live configuration variables such as username and passwords to mysql (or whatever you're writing for). The example below figures your w...
1 1418 posted 15 years ago by jackkeller
You will need to add “define(‘WP_ALLOW_MULTISITE’, true);” in your wp-config.php to make the multisite function accessible. If you want to copy paste, use the code block below:
0 1242 posted 15 years ago by myke
0 1205 posted 15 years ago by juannaviap
1 1288 posted 15 years ago by kaartz
Display random posts without a plugin
4 1861 posted 15 years ago by DanielPaul
A simple PHP application for counting how many views a page gets.
0 1531 posted 15 years ago by FelixT
1 2012 posted 15 years ago by 3k-
1 1808 posted 15 years ago by yeremiloli
A password generator in one line!
2 1757 posted 15 years ago by koko
easy but I tend to forget
0 1353 posted 15 years ago by dmistriotis
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 2219 posted 15 years ago by mediamilan
Paste the code in a file named style.php. Don’t forget to include your css files . Once done, open your HTML document and import style.php as you’ll import a css stylesheet.
3 1810 posted 15 years ago by math89
Turn a html source into a full text document by removing all html tags and other unneeded code.
0 1766 posted 15 years ago by math89
This PHP code snippet checks each integer in an array. If necessary, one or more leading zeros are added to an integer. Note that each integer becomes a string.
2 2029 posted 15 years ago by DADU
0 1198 posted 15 years ago by jamiebrwr
This custom function is useful if you want to get the ID of a page.
1 1745 posted 15 years ago by simonbouchard
Place into fucntions.php
3 1351 posted 15 years ago by jamiebrwr
1 ... 80 81 82 83 84 ... 147