Welcome To Snipplr


Everyone's Recent PHP Snippets



1 ... 33 34 35 36 37 ... 147
Removing the generator tag for security purposes... add to the bottom of your theme's functions.php file
0 597 posted 12 years ago by RainyDayMedia
Add to the bottom of the your theme's function.php file. Change to your site's name
0 691 posted 12 years ago by RainyDayMedia
For those of use who use Wordpress as a CMS, this gives you the option of hiding all your dashboard widgets, for all users. <br>**Open your theme’s functions.php file located in your theme’s folder. Copy this script, paste it at the bottom of y...
0 749 posted 12 years ago by RainyDayMedia
add this in functions.php
0 680 posted 12 years ago by IronMANro
Paste this code at the top of your .php file. You can choose this new site template when creating a new wordress site.
0 308 posted 12 years ago by rofthedeep
<?php> will random load images named (in this example) image_1.jpg up to image_5.jpg
0 740 posted 12 years ago by DeluxiveState
With this file you can load stylesheets and minify the code while changing colors. The stylesheets are loaded using file_get_contents and you can attach them one after another if you have multiple sheets. The colors are replaces based on a variable t...
0 685 posted 12 years ago by FatFolderDesigner
You can use this in Joomla extensions where you need to get the current language locale for example to use with Facebook Connect/Like plugins etc. in the "en_US" format. With facebooj JS, all you have to do is replace the default locale with the resu...
0 780 posted 12 years ago by burconsult
It's not immediately clear from the `context_set()` function how to trigger a context to be "active" using code. Do it like this:
0 602 posted 12 years ago by jonathanpglick
This small snippet can be used to get the children and grand children of a Wordpress page. See the comments for how it works
0 857 posted 12 years ago by jvandemerwe
0 702 posted 12 years ago by jose_506
1 892 posted 12 years ago by jose_506
0 572 posted 12 years ago by jose_506
Using the ID of a page, you can get the content, the featured image and the title to power widgets in your template.
0 598 posted 12 years ago by mejamiewilson
0 564 posted 12 years ago by distribuida
This is a custom class for caching results through php's session. The class can be used to cache anything, but i use it to cache mysql results so i don't have to get all the time the results by querying MySQL (wich may take a long time, especialy if...
0 941 posted 12 years ago by TimoZachi
A couple of ideas and options...
0 452 posted 12 years ago by stefpretty
A function that resizes an image to desired width and height, but does not distort the image proportions. Works for JPEG, GIF and PNG.
0 828 posted 12 years ago by TimoZachi
This code snippet gets all information from a YouTube video (title, description, duration, thumbnail url, thumbnail width, thumbnail height, etc..) using the video id and YouTube API.
0 1642 posted 12 years ago by TimoZachi
0 1044 posted 12 years ago by kspal
Example call: $menuName = sleek_get_theme_menu_name('footer-menu')
0 906 posted 12 years ago by Huskie
No modifications or testing carried out yet.
0 963 posted 12 years ago by Huskie
Could possibly be simplified to maximise efficiency. It relies on a separare WP Sleek framework function sleek_get_theme_menu_name. This could ideally be improved to allow the theme location to passed as a parameter somehow.
0 968 posted 12 years ago by Huskie
find a mac address using php
0 565 posted 12 years ago by mariraj
0 659 posted 12 years ago by jamiebrwr
use in template <?php> sau <?php>
0 474 posted 12 years ago by IronMANro
1 ... 33 34 35 36 37 ... 147